LowLevel - WaveOutput from Memory

Windows specific forum
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Froggerprogger.

Hello!
I'll try to ask my question in English :wink:

My aim is to communicate with the PCs Soundcard in LowLevelMode via the Win-API-functions mmio/waveOut... to listen to mathematical Expressions.
I tried hard to do so - without luck - by doing the following:
(I have a VB-Script wich I tried to translate)

1. Open a WAV-File and get the Format-Chunk-Data via mmIO - functions or my own Procedures.
2. AllocateMemory() for Buffered Output
3. Open an Output-Device with waveOutOpen_()
4. While Playing:
- Copy WAV-Data into Memory
- Play MemoryData with waveOutPrepareHeader_()

I think it's no problem to change the Data-Input from a Wavefile-FileSeek to a Math-Expression. But the points 3 and 4 drive me crazy!

My questions now:
a) Is the plan generally OK?
b) Can anyone give me some hints? Or any other help? Give examples?


Purebasic - what a nice name for a girl-friend
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by SoulTaker.

Hi Froggerprogger,

I have VB Source code here someplace that does all that and add's echo effects etc I'll see if i can dig it up for you.




Abit BD7-II Raid P4 1.9 gHz 384 Ram Xtasy GFroce 3 TI 200 CD-RW DirectX 9.0 Beta 3 Sound Blaster Live! XP Pro, Registered PureBasic User Version 3.40 For Windows.
Post Reply