Hi, I'm making a custom sound class, basically, outside the class, I mesh several sounds into one byte array. Thats fine, It's not a problem. Now, I want to play one byte at a time. Long story short, I can't use DirectX or simply give the program a huge byte array. So, how do I pull one sound byte off and play it and then move on?

This is my API

Friend Declare Function PlaySound Lib "winmm.dll" (ByVal data() As Byte, _
            ByVal hMod As IntPtr, ByVal hwFlags As Integer) As Integer

Because a sound is some thing really complex, a byte can not hold enough info tho start playing a sound and stop waiting for the next byte.

If you send one byte at each call to the PlaySound, you will hear nothing or pure noise, or even can crash.

Please refer to http://msdn.microsoft.com/en-us/library/ee663260(v=VS.85).aspx for info on Audio and Microsoft. Special interest for CoDec.

Hope this helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.