Ok, the stereo and rate issues seem resolved, but there is still something wrong, which I described in the original report. I don’t think it ever went away; I’ve just been ignoring it in favor of resolving the stereo/rate thing. And I don’t believe your update is relevant, because I’m not using static samples.
So, in the interest of time please consider this…
I have prepared 2 FSB files. One contains close to 40 WAV effects, which range in length from 33 msec to 3.7 secs. When I go through each effect, the only sounds that play back correctly are those that are shorter than about 350 ms. The rate (decoding frequency) is always OK, but the longer sounds are played back in a skipping manner (so that they finish too quickly). If you’ve ever used an LP, you could imagine playing a song, and every few beats throwing the needle forward a few grooves.
Certainly sounds like a buffering issue to me.
But why, then, does my second FSB file not produce this problem? This file contains only four WAV sounds, which range in length from 710 msec to 3.0 secs. All four sounds play back perfectly, despite the fact that each is clearly longer than the aforementioned 350 msec.
Thus, unless an obvious explanation comes to mind, it may be useful to consider how the size of (or the number of elements in) an FSB file might come to bear on playback behavior.
I have played with the stream buffer size, but to no avail.
TestME.FSB contains 37 WAV effects, so 0 to 36 are valid indices.
You don’t really know how the effects are supposed to sound, but if the problem replicates on your end it should be most apparent with items #1, 17, 27, 32, and 36 (the latter being a brief, musical segment).
[quote:2m9whb9a]- Fixed FSB mixed format issue.[/quote:2m9whb9a]
Alrighty… I give up trying to be independent. I need some hand-holding to walk me through the process.
What, specifically, must I do to create an FSB container for 30 or so WAV effects, when the WAV files are a mixture of mono and stereo and when bit-depth and sampling-rate are held constant?
Does the sampling rate matter? Does the bit rate matter? [E.g., stereo sample has twice the bit rate of a mono sample with same sampling rate and bit depth.]
What must I do to trigger these effects during game play so that the stereo effects play back as stereo?
[quote:377n6dv1]Nothing? If an FSB has a stereo sound amongst mono sounds, it will create the stream as a stereo stream, and any mono sounds are just duplicated in the left and right when played.[/quote:377n6dv1]
Not in my quadrant of the universe. In fact, even when I prepare an FSB file containing nothing but stereo sounds, all my sound effects are being played back as mono sounds. The background music operation is correct, but for that I’m just streaming from local music files (MIDI/WAV/MP3). Thus, I must not be operating the FSB file correctly.
The current method is:
(1) FSB file is opened for streaming;
(2) GetSubsound is called to locate the desired WAV effect;
(3) Execute sound
This method is wrong. What should I be doing instead?
Ok, the mono problem is due to the 3D flag. But, the original (speed) issue lingers in this version.
Try making an FSB with two WAV sounds:
- 16-bit stereo, 11025 Hz (352kbps)
- 16-bit MONO, 11025 Hz (176kbps)
1 plays back in stereo at correct speed.
2 plays back at half speed.
[Note–The behavior doesn’t change if the sounds are swapped in the FSB file, so that the mono sound is the first item.]
What gives? Am I supposed to manually reset the playback channel frequency to 22050 or something before playing the mono sounds?
Please login first to submit.