≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Sounds playing at wrong speeds
Posted by:
(you are not logged in)
Enter the missing letter in: "?nternational"
(you are not logged in)
Text:
[quote][b][/b] wrote: Thanks for the response! Using ESOD_WIN_MM the bug does not occur and setting the playbackSpeed seems to work fine. Sadly this driver seems to have its own issues, that is random crackling every now and then (like a sound that ends with non-zero amplitude), other strange noises and a delay on every sound that I play (by 200ms+). When I compared the results of ESOD_WIN_MM and ESOD_DIRECT_SOUND(_8) I noticed something though: Using ESOD_DIRECT_SOUND(_8) the sound "breaks" during slow mo on playback start, not when I return to normal speed again. I play a sound on 0.5 speed for the first time it plays fine. The next play2D call of the same sound file may break (assuming that the previous sound is still playing) in the sense that [b]it seems to take the previous sound instance's audio as the source, then apply the playback rate modifier on top of that[/b] (bringing it down to ~ 0.25 speed). When the game returns to normal speed, these instances will be sped up as well (from 0.25 to 0.5 I guess). Results for initial speeds between 0.5 and 1.0 are analogous. [quote]You could try to set the playback speed for every sound when starting a sound, maybe this would be a workaround.[/quote] This is what I'm doing, just for the sake of completeness: [code]DLLFUNC ISound* irrKuPlay2D2(const char* file, bool loop, float volume, float pan, float speed) { ISound* sndResult = irrKuEngine->play2D(file, loop, true, true, ESM_AUTO_DETECT, false); if (sndResult) { sndResult->setVolume(volume); sndResult->setPan(pan); sndResult->setPlaybackSpeed(speed); sndResult->setIsPaused(false); } return sndResult; }[/code] I only had a quick look at DirectSound but can you please double check the appropriate/ corresponding play and buffer(.write?) code? Does it maybe clone the buffer if there's already an instance of that sound in an erroneous way under some circumstances (unlikely because of the randomness of the issue, I know - but still)? Thanks again.[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact