0
0

Hi
i want to Streaming Audio using this method
1.Fill Array of Byte with MP3 Data " Dim Stream_Data() as Byte"
2.Write Stream_Data to File
3.in the same time Play Stream_Data using fmod
4.Still filling Stream_Data with new Recieved Data and fmod is still playing

The Next Code for Test "Play File from Memory"
loading total file to memory then playing it
[code:3ckcxqal]
Dim soundHandle As IntPtr
Dim MP3_Stream As IntPtr
Private Sub MP3Streaming()

FMOD.fmod_Init(44100, 16, 0)
Dim FS As New IO.FileStream("\Storage Card\test.MP3", IO.FileMode.Open, IO.FileAccess.Read)
Dim Stream_Data(FS.Length) As Byte
Dim MS As New IO.MemoryStream(Stream_Data)

    FS.Read(Stream_Data, 0, Stream_Data.Length - 1)
    MS.Write(Stream_Data, 0, Stream_Data.Length - 1)
    FS.Close()

    'MP3_Stream = ??  i don't know how to use MemoryStream in this Case
    soundHandle = FMOD.fmod_Open(MP3_Stream, 32768, 0, 0) ' or &H8000 or FSOUND_LOADMEMORY
    FMOD.fmod_Play(0, soundHandle)

End Sub
[/code:3ckcxqal]
i search fmod forum for all topics talk about FSOUND_LOADMEMORY
but i still fail
i don’t know how to make fmod read mp3 from Array Stream_Data

if this code success then i will use it in Audio Streaming over Network

Thanks for all

  • You must to post comments
0
0

UP
UP
UP

Stream MP3 Data from Memory

  • You must to post comments
0
0

[url=http://www.fmod.org/forum/viewtopic.php?t=11814:1we803s1]Streaming an MP3 in FMOD[/url:1we803s1]

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.