Please use …[/code[b][/b]] tags when posting code on the forum, to
preserve the formatting. As for your problem, your sine-generating code
looks wrong. It’s a buffer of integers, but you’re multiplying by
0.000001, so everything will be rounded to zero. With S32 amplitudes the
range is +/- 2 billion and change. Try multiplying the sine by 100
million or 1 billion and you should be able to hear something.
[code]…[/code****] tags when posting code on the forum, to preserve
the formatting.

As for your problem, your sine-generating code looks wrong. It’s a buffer of integers, but you’re multiplying by 0.000001, so everything will be rounded to zero. With S32 amplitudes the range is +/- 2 billion and change. Try multiplying the sine by 100 million or 1 billion and you should be able to hear something.

Hi,

I am new to openAL. I wanted to generate a wave with user parameters using openAL. i.e. according to the parameters input, a certain wave will be produced. The code I wrote is below. I am unable however, to get a sine wave at the parameters that should be producing a sine wave. So i feel that there is a problem with my code.. Any help would be greatly appreciated. Thank you.