0
0

I can’t seem to find any information on this, so maybe someone else can help me here.

Lets say I have an FSB full of sound effects, and I load it up as a STREAM. Would the pulled sub sounds from the FSB also have the STREAM flag setting as well or would these be loaded as sample?

My guess, currently, is that the flags used when loading the FSB are copied over to any sub sounds I pull from this FSB. Correct me if I’m wrong here.

—Project Issue—

I have a program that uses 2 FSB files. One for SFX, the other for BGM. I would like to have it so I can STREAM both in. This way I can pull sounds from the banks without having the entire things in RAM (and so I don’t need to re-load them each time I want to pull a sound). My problem tho is my thinking that any sound effect I pull from the SFX FSB would have the STREAM flag attached to it, which would be a problem.

So before I go any further in my project, I’d like to figure this out so I can code my engine correctly.


So I guess my real question boils down to this. When you pull a sub sound from a parent sound, are the flags of the parent passed onto the sub? Are there any other flags included/excluded? (I’m using Sound::getSubSound to pull these, which doesn’t give any way to set flags onto the sounds pulled).

EDIT:

Hmm, it appears I completely miss understood how FSBanks work. I though, initially, that you ‘pull’ sounds from the bank (thus, once you pull what you want, you can remove the bank). However, this doesn’t appear to be the case. I also confirmed my assumption that the flags of the bank are kept to the sub sounds pulled.

So I guess I answered my own question.

~Brandon

  • You must to post comments
0
0

[quote="Shaltif":iksd7585]I can’t seem to find any information on this, so maybe someone else can help me here.

Lets say I have an FSB full of sound effects, and I load it up as a STREAM. Would the pulled sub sounds from the FSB also have the STREAM flag setting as well or would these be loaded as sample?
[/quote:iksd7585]

Its a stream and all subsounds share the same stream buffer and file handle (obviously we wouldnt create 1000 file handles and stream buffers for 1 fsb).

[quote:iksd7585]
My guess, currently, is that the flags used when loading the FSB are copied over to any sub sounds I pull from this FSB. Correct me if I’m wrong here.
[/quote:iksd7585]

That would be correct, except for some flags that may not affect if it is a stream or not, such as FMOD_2D or FMOD_3D.

[quote:iksd7585]
—Project Issue—

I have a program that uses 2 FSB files. One for SFX, the other for BGM. I would like to have it so I can STREAM both in. This way I can pull sounds from the banks without having the entire things in RAM (and so I don’t need to re-load them each time I want to pull a sound). My problem tho is my thinking that any sound effect I pull from the SFX FSB would have the STREAM flag attached to it, which would be a problem.

So before I go any further in my project, I’d like to figure this out so I can code my engine correctly.


So I guess my real question boils down to this. When you pull a sub sound from a parent sound, are the flags of the parent passed onto the sub? Are there any other flags included/excluded? (I’m using Sound::getSubSound to pull these, which doesn’t give any way to set flags onto the sounds pulled).

EDIT:

Hmm, it appears I completely miss understood how FSBanks work. I though, initially, that you ‘pull’ sounds from the bank (thus, once you pull what you want, you can remove the bank). However, this doesn’t appear to be the case. I also confirmed my assumption that the flags of the bank are kept to the sub sounds pulled.

So I guess I answered my own question.

~Brandon[/quote:iksd7585]

If you want an fsb to be streamed, use createStream, or if you want it loaded into memory, use createSound, there’s not much else to it than that. Once it is loaded you cant switch subsounds from static to streamed and vice versa.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.