Re: Oscilloscope trace of sound signal



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


.



Relevant Pages

  • login on 1394
    ... I'm working on a project trying ot make my Linux box as a target on ... Somehow almost at the end of the whole process, while the Windows is ... I cannot see anything wrong from the trace. ...
    (microsoft.public.development.device.drivers)
  • Re: No sound in WMP but sound OK on other players, internet, etc.
    ... is a problem with your sound device. ... OK when I play videos on YouTube, etc and Windows plays its sounds through ... Digital Media MVP: 2004-2007 ...
    (microsoft.public.windowsmedia.player)
  • Re: No Sound mixer device.
    ... Make sure that the Windows Audio service is set to Automatic and started. ... There may not be a sound device installed on your ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: could play downloaded movie clips fine now they wont play
    ... Did you go to the website of your PC manufacturer and download and install updated audio drivers? ... Windows Media Player encountered a problem while playing the file. ... To determine if an updated driver is available, ... Update at the Microsoft Web site, or see the sound device manufacturer's Web ...
    (microsoft.public.windowsxp.video)
  • RE: driver is enabled but not started
    ... Click "Open Volume Control." ... > updates available on windows updates or from driver manufacturer. ... >> speakers that means you have a sound device installed. ...
    (microsoft.public.windowsxp.music)