It is currently Sun Oct 22, 2017 8:54 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: Audio rendering?
PostPosted: Tue Jan 26, 2016 1:54 am 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 578
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
When you use WaveOut on Windows you can do a little dirty thing and do your buffer commits in the callback which pretty much guarantees problem free playback.
You have to stop committing new buffers and wait for current ones to finish playing prior to closing WaveOut or it'll hang. Works perfectly from Win95 and up :beer:

_________________
http://www.tmeeco.eu


Top
 Profile  
 
 Post subject: Re: Audio rendering?
PostPosted: Tue Jan 26, 2016 2:12 am 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:06 am
Posts: 583
Location: Gothenburg/Sweden
Can you explain this a little bit more perhaps? What do you mean with "buffer commits in the callback".

Currently I'm using SlimDX for DirectSound but /!"(#/ there almost no examples anywhere on how to use it properly.

_________________
http://nes.goondocks.se/


Top
 Profile  
 
 Post subject: Re: Audio rendering?
PostPosted: Tue Jan 26, 2016 2:57 am 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 578
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
I cannot help with DirectSound, only WaveOut.

WaveOut provides a callback so you can handle things immediately without having to wait for things to finish etc.

https://msdn.microsoft.com/en-us/library/windows/desktop/dd743866(v=vs.85).aspx?f=255&MSPPError=-2147217396

_________________
http://www.tmeeco.eu


Top
 Profile  
 
 Post subject: Re: Audio rendering?
PostPosted: Tue Jan 26, 2016 1:47 pm 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:06 am
Posts: 583
Location: Gothenburg/Sweden
I've done a simple que-system.. XX ms is buffered and added to the que. The player (which calls itself at XX ms intervall) takes the oldest from the que and plays it.
Still got issues however.. This was alot more annoying/difficult than I thought it should be..

_________________
http://nes.goondocks.se/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bing [Bot], Google Adsense [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group