0
0

Hi,

i want to create a sample from an array of values, but i dont know how it exactly work. I try to make something, but it doesn’t work, i dont hear anything.
Here is my code:

[code:1tn7xdrp]
procedure TForm1.Button1Click(Sender: TObject);
var
j : integer ;
begin
sound1 := FSOUND_Sample_Alloc(FSOUND_FREE,44100,FSOUND_8BITS or FSOUND_MONO,44100,255,128,1);
for J := 1 to 44100 do
begin
buffer[j]:=40000;
end;
bufferptr:=@buffer;
FSOUND_Sample_Upload(sound1,bufferptr,FSOUND_8BITS or FSOUND_MONO);
FSOUND_Playsound(FSOUND_FREE,sound1);
FSOUND_Sample_Free(sound1);
[/code:1tn7xdrp]

Any suggestion’s making me very happy!
Thx

  • You must to post comments
0
0

Ok, i finished it, have the solution, rewrite the whole shit in c++ and now its working, the wav writer is also great. FMOD is extremly good, i love to work with it. My next project will be a sampler under delphi.
Thx for this SoundSystem again!
Kluner

  • You must to post comments
0
0

the above code wouldnt produce any sound as you are filling the buffer with a constant value, it must oscillate to produce sound

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.