0
0

when a stream is playing from the internet (shoutcast) … i want to save it to disc… i have 2 problems

1)

pushing a controlbutton conteining this procedure

rawwrite_dsp = FSOUND_DSP_Create(addressof DSP_RawWriteCallback, FSOUND_DSP_DEFAULTPRIORITY_USER, 0)
call FSOUND_DSP_SetActive(rawwrite_dsp, TRUE)

the stream becomes a rumor and it returns normal only if i push another controlbutton containig this

call FSOUND_DSP_SetActive(rawwrite_dsp, FALSE)
call FSOUND_DSP_Free(rawwrite_dsp)

what happens ???

2)

the dsp_rawwritecallback function is:

Public Function DSP_RawWriteCallback(ByVal originalbuffer As Long, ByVal newbuffer As Long, ByVal length As Long, ByVal param As Long) as long

”’ i suppose here i have tu write this
put#h , , newbuffer

in which way how do i have to open the file ??? binary, random, etc ????
in which way how do i retrieve the newbuffer data from the pointer ???

end function

thanks

  • You must to post comments
0
0

If your’e outputing to raw format then it would be really easy to do this. You need to open the file in binary. Do it like this:
[code:3twbmlvt]
Open File For Binary Access Write Lock Read Write As #h
[/code:3twbmlvt]
This will open the file and prevent it from being accessed by other programs. Then all you need to do is do what you wrote:
[code:3twbmlvt]
Put #h, , newbuffer
[/code:3twbmlvt]
And at the end of your DSP callback you need to return the newbuffer into the dsp chain, so put this at the end:
[code:3twbmlvt]
DSP_RawWriteCallback = newbuffer
End Function
[/code:3twbmlvt]
That should work fine. But it won’t be in Wav format.
Btw, this is Paranoid_Android, but Im too lazy to log in! hehe 😀

  • You must to post comments
0
0

Is fmod a stream ripper? :(

  • You must to post comments
0
0

no but it could probably be used to rip streams

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.