from memory directly to soundcard !?

Just starting out? Need help? Post your questions and find answers here.
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.

>> I think I posted the following in the wrong forum, so here it is:<<

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 Danilo.

I think you should take a deeper look to http://www.fmod.org,
because its very powerful and allows you also to
play Sound-Data from a Memory buffer.

cya,
...Danilo

(registered PureBasic user)
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.

I downloaded the Api and took a deeper look, just as you said, and it's really EXACTLY what I was looking for!
Thank you very much and have a nice Christmas!

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 Andre.
Thank you very much and have a nice Christmas!
Not only in the super-markets is already Christmas

Regards
André

*** German PureBasic Support ***
Post Reply