I’m having the following problem (I’m using this latest release, although the problem was present in version 4.01.05 too):
I create a sound object from a wave file, and set its mode to LOOP_NORMAL.
When I create the sound object without the FMOD_CREATESTREAM flag I can play() the sound multiple times and hear them all playing together.
It is also my intention to use compressed audio, and so I want to use FMOD_CREATESTREAM at createSound().
The problem is that when I use this flag, calling play() repeatedly does not result in the sound playing multiple times. Each time play() is called on the same sound, any previous channels playing that sound are stopped. Calling Channel::isPlaying() returns that the other channels are no longer playing.
Maybe this is a limitation of using streams, and a separate sound object must be created for each instance of a sample? Though if this is the case it should be documented.
Thanks in advance
ps. Great work with the continued updates.
- justinc asked 12 years ago
I remember from previous discussions there may be a flag FMOD_PLAYCOMPRESSED, to allow the software mixer to decode as it plays. If using this, together with FMOD_OPENMEMORY I imagine many instances of the sound could play together?
You will need to re-visit the FSB issue. It is not necessary for me to send you anything; you can surely reproduce this yourself, at your leisure. I have described the recipe and outcomes elsewhere.
Using fsbankex.exe (PCM 1:1 format) and DLL from latest update (4.02.01)…
First, simply refer to http://188.8.131.52/forum/viewtopic.php?t=4551 :
See post #1, and note that “too fast” has now become absurdly “too slow.” All else applies.
See post #5. All five samples play back at correct speed, but the four stereo samples play back as mono.
Item #5 refers to 44100 Hz samples; item #1 refers to 11025 Hz samples. Thus, you might consider sampling-rate as a factor in this putative bug. Lastly, if the ‘Retain Original Format’ option is used when creating the FSB file, there is NO playback in either situation–and I do not understand why, because the subsounds are natively the same format (uncompressed PCM), same bit depth and same sampling rate.
- stdev answered 12 years ago
[quote="brett":18pri7in]Yes this is correct. 4.03 should have this feature as the main ‘big feature’ for that release.[/quote:18pri7in]
That’s good news, I think it’ll be a very useful addition. ADPCM should be fine for starters.
[quote="brett":18pri7in]We will be starting with native ADPCM sample support in the mixer. It is one of the few formats that has a very low memory overhead per instance (i think something like 16 bytes) compared to ogg which can currently take 400-600k per instancel, and has dynamic memory allocation within the codec which is not good.[/quote:18pri7in]
Maybe it would be useful to describe memory usages in the manaul too. I’d be interested in the memory usage of mp3/mp2 per instance.
I’m having a problem with the Xbox 360 when using FMOD in a memory pool. If I try to play an xma file, the system freezes and reboots. However uncompressed wav files play just fine. It doesn’t appear to be running out of memory (I’ve tried with a pool size of up to 300MB for a single file).
You can easily reproduce this by adding a call to Memory_Initialize() to the playsound demo.
// Memory pool allocation
INT MemoryPoolSize = 1024102464;
char* memoryPool = new char[MemoryPoolSize];
result = FMOD::Memory_Initialize(memoryPool, MemoryPoolSize, NULL, NULL, NULL);
Create a System object and initialize.
result = FMOD::System_Create(&system);
Any help would be greatly appreciated.
[quote="brett":1xxjfzj9]You have to read the xbox360 tutorial in the documentation.
XMA support needs buffers allocated with XPhysicalAlloc. malloc and free will not allow XMA to function correctly.
Heh. Should have known… RTFM. Thanks!
I’m also having a problem with this version:
I have a stereo stream that I open in SOFTWARE, 2D mode.
What I want is to play it with different volumes on front and rear outputs.
In previous versions, this worked fine by using setSpeakerMix, setting a different volume for front_left, front_right, and back_left, back_right.
In the latest version however, everything works fine as long as only front_left and front_right have a volume, and the other values are zero.
As soon as I set a volume to the rear outputs, the sound sounds distorted and high-pitched.
I also tried to use setSpeakerLevels instead, but this gave exactly the same results.
When looking at the values I get in the dsp on the master output, I see 6 inchannels and 6 outchannels (which is what I expected)
But it appears that only the first half of the buffer is filled with data, and the other half is empty.
So it looks like instead of copying the source channels to the front and the rear outputs, it appears that new data is being used to fill the rear buffers.
- Adion answered 12 years ago
Please login first to submit.