Re: OSS sound

Peter Hunnisett <[email protected]>
Newsgroups gmane.comp.emulators.winex.devel
Message-ID <[email protected]>
Rob Crittenden wrote:

>I started poking around winealsa to see if I could contribute anything.
>Since the OSS section is much better tested I thought I'd do a comparison
>to see if there was anything quick that could be ported over. During this
>review I found a discrepency.
>
>Now #ifdef USE_PIPE_SYNC is always used in OSS but if one really wants to
>use Windows events instead the code is there. This is where the discrepency
>is.
>
>In #ifdef USE_PIPE_SYNC you have:
>
>#define CLEAR_OMR(omr) do { int x = 0; read((omr)->msg_pipe[0], &x, sizeof(x)); } while (0)
>#define RESET_OMR(omr) do { } while (0)
>
>and in the #else you have:
>
>#define CLEAR_OMR(omr) do { } while (0)
>#define RESET_OMR(omr) do { ResetEvent((omr)->msg_event); } while (0)
>
>So basically clear and reset are reversed depending on whether one is using
>pipes or events. 
>
>If the unix pipes are clearly faster it would seem a good optimization to
>port this code over to the Alsa driver (which still uses events) but I
>wonder which behavior is correct. This looks like real low-hanging fruit.
>
Unix pipes are faster than win32 events with the present setup. Feel 
free to code up an X11 licensed patch. I'd be happy to include it.

>It also seems strange to go thru the trouble of a while loop that will always
>be false...
>
It's a standard C idiom to make macros look like functions. Once can 
write CLEAR_OMR(parm); in the code (note semicolon)

>
>rob
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: SF.net Giveback Program.
>Does SourceForge.net help you be more productive?  Does it
>help you create better code?   SHARE THE LOVE, and help us help
>YOU!  Click Here: http://sourceforge.net/donate/
>_______________________________________________
>WineX-devel mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/winex-devel
>
>  
>


-- 
Peter Hunnisett
Software Development Manager
TransGaming Technologies Inc.
312 Adelaide Street West, Suite 301
Toronto, ON
Canada  M5V 1R2
Bus: +1 416.979.9900 x327
Fax: +1 416.979.9908
[email protected]
http://www.transgaming.com
*Let the games begin*



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.