Re: Oscilloscope trace of sound signal
- From: "Chris Uppal" <chris.uppal@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 8 Jun 2006 11:31:05 +0100
Andrew T. wrote:
If you would be so kind, try compiling the source* with..
static boolean allLines = true;
..to get a trace of every line.
Done that. The output now is:
Format: PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
Format: PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
I added some extra tracing too, and it appears that the first line corresponds
to some sort of virtual sound device maintained by Windows which is an alias
for the second. Thge second is the real sound device in this laptop. I
remembered that I had a USB headset and plugged that in too (which
automatically adds a new hardware sound device to Windows and makes the virtual
device point to it), and the output changed to:
Format: PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
Format: PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
Format: PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
In both cases the top two lines produced similar (but not actually identical)
traces -- clearly showing the same sounds, but possibly subject to some sort of
timing differences. Which may in part be because the program pushes the
machine to 100% CPU so maybe the software in the virtual device can't quite
keep up.
In both cases the only lines displayed were connected to microphones (two
different mics in the second test).
One more test. Unplugging the headset (and so reverting to the original 1
virtual + 1 real device), and activated the recording control aspect of the
Windows (ultra confusing) volume control applet. It seems that the recording
control suggests 4 possible sources of input:
Mono Mic
Sterio Out
Microphone
Telphony
I tried all of them, and in each case ended up with the same format as above
(even the "mono" mic was stereo). Selecting the "Stereo out" option seems to
connect the input to the current output (why?) and -- at last -- your program
showed the current sound output. Unfortunately this feature seems to be in the
device itself rather than software, because the headset driver only offers the
"Microphone" option.
I'd try this on a Linux box too, but my Linux installation runs in VMWare over
a Windows host OS. And fathoming what's going on when we have Java's sound
system sitting on top of the Linux sound system (whatever /that/ is), on top of
VMWare's peculiar hackery, on top of Windows wierdness, would undoubtedly make
my brain explode...
-- chris
.
- Follow-Ups:
- Re: Oscilloscope trace of sound signal
- From: Andrew T.
- Re: Oscilloscope trace of sound signal
- From: Oliver Wong
- Re: Oscilloscope trace of sound signal
- References:
- Oscilloscope trace of sound signal
- From: Andrew T.
- Re: Oscilloscope trace of sound signal
- From: Chris Uppal
- Re: Oscilloscope trace of sound signal
- From: Chris Uppal
- Re: Oscilloscope trace of sound signal
- From: Andrew T.
- Oscilloscope trace of sound signal
- Prev by Date: Re: Book or Tutorial Recommendation
- Next by Date: Re: Compilation problem
- Previous by thread: Re: Oscilloscope trace of sound signal
- Next by thread: Re: Oscilloscope trace of sound signal
- Index(es):
Relevant Pages
|