Daniel Yek wrote:
Thanks so much for the detailed report. It helped enormously.

no problem. the more details i supply, the better chance y'all will be able to help me fix the problem!


Could you try out the following patch? There is a success path through CAudioOutLinuxAlsa:_OpenAudio() where wLastError was not set to RA_AOE_NOERR.

Index: audlinux_alsa.cpp
===================================================================
RCS file: /cvsroot/audio/device/platform/unix/audlinux_alsa.cpp,v
retrieving revision 1.4.6.4
diff -u -w -r1.4.6.4 audlinux_alsa.cpp
--- audlinux_alsa.cpp   26 Oct 2006 22:33:01 -0000      1.4.6.4
+++ audlinux_alsa.cpp   14 Dec 2006 01:35:47 -0000
@@ -155,7 +155,7 @@
 {
     int err = 0;
     const char* szDevice;
-    HX_RESULT wLastError;
+    HX_RESULT wLastError = RA_AOE_NOERR;

nope, didn't fix it.

This eventually results in a crash in the function CAudioOutUNIX::_Imp_Pause(). It fails with a SIGFPE due to the following line of code:

//Make sure we only deal with full samples.
Bytes-per-sample*num-channels.
        int nRem = ulNumBytesToRewind%(m_uSampFrameSize*m_unNumChannels);

This only happens when:
Supports HW Pause: 0

I suppose you saw this output if the audio device is opened successfully. Just to verify...

yes, i did see this output.  no hardware pause support.  ;(-

I'm puzzling over where CAudioOutUNIX::_Imp_Pause() being called when device open wasn't successful (or at least, was reported to be not successful, while in fact, it was successful.)

Is there such a condition? We would have to look there to see if it needs fixing.

yea, there does seem to be such a condition...


In this case, due to the above EBUSY returned in the _OpenAudio() function, uBitsPerSample is 0.

I'm suspecting that _OpenAudio() returned an un-initialized value in one path through the function.

Thanks, Tony. Let me know if that patch works. My sound card has hardware pause support, so I can't repro. this problem.

an easy way to reproduce the problem is in _OpenAudio(), set err = -EBUSY right after the call to snd_pcm_open().

when i do this, i hit the problem every time.

/t

_______________________________________________
Audio-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev

Reply via email to