Pergunta

Is there a way to create a sound from scratch using DirectSound, e.g play the notes a c, d, e, f,g etc? However, the sound must be realistic, and sound at least a little like a proper sound.

Thanks. I have tried to be as concise yet as detailed as I can.

Foi útil?

Solução

This is what an audio synthesizer does. There are many techniques - you probably need to narrow down what you want to do before you can get useful advice.

However, the simplest technique that will produce a tone is to write an even number of periods of a sine wave of the correct frequency into a buffer, and play that as a looping buffer in DirectSound

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top