Record mediaconduit test data in WAV instead of raw pcm

RESOLVED FIXED

Status

()

Core
WebRTC: Audio/Video
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: rillian, Assigned: rillian)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment, 1 obsolete attachment)

Write a quick-and-dirty wav header on our recorded data so it's easier to verify.

I just spent several minutes trying to remember how to play raw pcm files with sox, and then guessing at the correct parameters, so I could verify recorded.pcm from mediaconduit_unittests. That's ridiculous when WAV is a straightforward format to write.

Fortunately, VoEFile handles WAV just fine, so no modification of webrtc_standalone_test is necessary beyond the filename change.

WAVE header code is from Robert O'Callahan's patch in bug 727697.
(Assignee)

Comment 1

5 years ago
Created attachment 652242 [details] [diff] [review]
proposed fix for recorded.wav
Assignee: nobody → giles
Attachment #652242 - Flags: review?(snandaku)

Comment 2

5 years ago
Comment on attachment 652242 [details] [diff] [review]
proposed fix for recorded.wav

Review of attachment 652242 [details] [diff] [review]:
-----------------------------------------------------------------

We can get rid of errno for now and commit the code. feedback+ from my side.

::: media/webrtc/signaling/test/mediaconduit_unittests.cpp
@@ +195,5 @@
> +  // Update the header
> +  unsigned char size[4];
> +  int err = fseek(outFile, 40, SEEK_SET);
> +  if (err < 0) {
> +    cerr << "Couldn't seek to WAV header: " << strerror(errno) << endl;

We should be good without the errno.

@@ +208,5 @@
> +
> +  // Return to the end
> +  err = fseek(outFile, 0, SEEK_END);
> +  if (err < 0) {
> +    cerr << "Couldn't seek to WAV file end: " << strerror(errno) << endl;

We should be good without the errno .
Attachment #652242 - Flags: feedback+
(Assignee)

Comment 3

5 years ago
Created attachment 652557 [details] [diff] [review]
fix for recorded.wav
Attachment #652242 - Attachment is obsolete: true
Attachment #652242 - Flags: review?(snandaku)
Attachment #652557 - Flags: review?(snandaku)
(Assignee)

Comment 4

5 years ago
Comment on attachment 652557 [details] [diff] [review]
fix for recorded.wav

Carrying forward earlier positive review. Suhas, you can just change the ? to + if you approve of a patch.
Attachment #652557 - Flags: review?(snandaku) → review+
(Assignee)

Updated

5 years ago
Attachment #652557 - Attachment is patch: true
(Assignee)

Comment 5

5 years ago
http://hg.mozilla.org/projects/alder/rev/644903e22112
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Updated

5 years ago
Attachment #652557 - Flags: feedback+

Updated

5 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.