Small DirectSound engine

User projects written in or related to FreeBASIC.
Post Reply
AWPStar
Posts: 47
Joined: May 03, 2009 21:47

Small DirectSound engine

Post by AWPStar »

Hi!

I'm developing small sound engine based on DirectSound for Windows.
basically, i'm going to use it from vb6.

Do not want to fill whole page by code, so here's links.
source
vb6 side

i need your advices =)
First of all, i don't know how to decode other formats.

Thanks!

functions:
  • snd_INIT(ByVal hWnd As Long) As Long
    snd_FREE() As Long
    snd_LastError() As Long

    snd_Load_WAVByVal szFile As String) As Long ' returns sound ID
    snd_Load_RAW(ByVal fmt As WAVEFORMATEX, ByVal DataPtr As Long, ByVal Length As Long) As Long ' returns sound ID
    snd_Update_RAW(ByVal i As Long, ByVal fmt As WAVEFORMATEX, ByVal DataPtr As Long, ByVal Length As Long) As Long

    snd_Close(ByVal id As Long) As Long
    snd_Status(ByVal id As Long) As Long

    snd_Play(ByVal id As Long, ByVal PlayLoop As Long) As Long
    snd_Stop(ByVal id As Long) As Long
    snd_Pause(ByVal id As Long) As Long

    snd_SetPosition(ByVal id As Long, ByVal Position As Long) As Long
    snd_GetPosition(ByVal id As Long) As Long
    snd_MaxPosition(ByVal id As Long) As Long

    snd_SetVolume(ByVal id As Long, ByVal Position As Long) As Long
    snd_GetVolume(ByVal id As Long) As Long

    snd_SetPanorama(ByVal id As Long, ByVal Position As Long) As Long
    snd_GetPanorama(ByVal id As Long) As Long

    snd_SetFrequency(ByVal id As Long, ByVal Position As Long) As Long
    snd_GetFrequency(ByVal id As Long) As Long
thesanman112
Posts: 538
Joined: Jul 15, 2005 4:13

Re: Small DirectSound engine

Post by thesanman112 »

Nice work.
Post Reply