sounds

sounds

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
monohouse

sounds

Post by monohouse »

sayin what happens to high-sampling rate samples when played with lower sampling rate I have a situation involving a 16,000 hz wave played with a 44,100 hz wave ?

which sampling rate is then being the active ? the lower or the higher ?
which means the other sampling rate is going to have to be up/down sampled.....
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

In the end everything is sampled with one frequency which is used for the output. I think this is normally 44100 Hz, so the 16000 Hz would be upsampled.
monohouse

Post by monohouse »

is the upsampling done in real-time on a per-file basis or is it being pre-upsampled when loading ? or in some other time ?

it might bee too cpu-expensive to upsample everytime .......

btw does spring use hardware mixing ?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

I'm not sure about either question.

I think the files are just loaded and upsampled by DirectSound (on windows/MSVC) or OpenAL (on other platforms).

Concerning hardware mixing I really have no clue. Maybe DirectSound uses hardware mixing if it's available. In that case, yes. But maybe we need special code to enable that, which may or may not be there. So I really don't know.
Post Reply

Return to “Engine”