| View previous topic :: View next topic |
| Author |
Message |
Mathieu Guest
|
Posted: Fri Apr 13, 2007 8:11 am Post subject: Delphi 2006 with DirectSound SDK 9 |
|
|
Hi,
I want play WAV files with DirectSound 9 SDK. How can I make play fonction ?
This is my code about my Buffer, is it valid ?
public
buffer:tDSBUFFERDESC;
buffer.dwSize := 1024;
buffer.dwFlags := DSBCAPS_CTRLFREQUENCY;
buffer.dwBufferBytes := DSBCAPS_PRIMARYBUFFER;
buffer.dwReserved := 0;
buffer.guid3DAlgorithm := DS3DALG_DEFAULT;
buffer.lpwfxFormat.wFormatTag:=WAVE_FORMAT_PCM;
buffer.lpwfxFormat.nChannels:=2;
buffer.lpwfxFormat.nSamplesPerSec:=(44100 div 100);
buffer.lpwfxFormat.nAvgBytesPerSec:=buffer.lpwfxFormat.nSamplesPerSec;
buffer.lpwfxFormat.nBlockAlign:= buffer.lpwfxFormat.nSamplesPerSec;
buffer.lpwfxFormat.wBitsPerSample:=buffer.lpwfxFormat.nSamplesPerSec;
buffer.lpwfxFormat.cbSize:=0;
Thanks
Mat in Paris. |
|
| Back to top |
|
 |
Zamrony P Juhara Guest
|
Posted: Wed Apr 18, 2007 3:45 pm Post subject: Re: Delphi 2006 with DirectSound SDK 9 |
|
|
You can try reading article that I wrote
http://juhara.com/article-9-playing-wav-and-midi-with-directx.html
as a start
Mathieu wrote:
| Quote: | Hi,
I want play WAV files with DirectSound 9 SDK. How can I make play fonction ?
This is my code about my Buffer, is it valid ?
public
buffer:tDSBUFFERDESC;
buffer.dwSize := 1024;
buffer.dwFlags := DSBCAPS_CTRLFREQUENCY;
buffer.dwBufferBytes := DSBCAPS_PRIMARYBUFFER;
buffer.dwReserved := 0;
buffer.guid3DAlgorithm := DS3DALG_DEFAULT;
buffer.lpwfxFormat.wFormatTag:=WAVE_FORMAT_PCM;
buffer.lpwfxFormat.nChannels:=2;
buffer.lpwfxFormat.nSamplesPerSec:=(44100 div 100);
buffer.lpwfxFormat.nAvgBytesPerSec:=buffer.lpwfxFormat.nSamplesPerSec;
buffer.lpwfxFormat.nBlockAlign:= buffer.lpwfxFormat.nSamplesPerSec;
buffer.lpwfxFormat.wBitsPerSample:=buffer.lpwfxFormat.nSamplesPerSec;
buffer.lpwfxFormat.cbSize:=0;
Thanks
Mat in Paris. |
|
|
| Back to top |
|
 |
henkjan Guest
|
Posted: Fri Apr 27, 2007 2:08 pm Post subject: RE: Delphi 2006 with DirectSound SDK 9 |
|
|
look at google for the Cloothie DirectX 9 Header files.. There can also be
found the directx 9 sample codes. |
|
| Back to top |
|
 |
|