OK, I have not been around the forums for a while. I had some very nice programs in Windoze and Linux that could stream web music to individual mp3 files using FMOD and lame_enc, they worked as good or better than streamripper and looked a whole lot better.
I downloaded fmod version 4 thinking I would check out any imrovements I could make and of course it won’t even compile. I used DSP_RawWriteCallback and FSOUND_Stream_Net_SetMetadataCallback, previously.
It looks like it’s going to be a lot more work than just changing some api calls, the whole logic of the program will have to change. I had a version in BCB 6 with nice dials and meters being updated in real-time while the sound was playing and mp3 files being written.
Are there any examples I can look at, I really don’t want to spend too much time on this, but I don’t want to be stuck in version 3.x
- arnoldmm asked 13 years ago
[quote="brett":2bxpad4g]ok so you’re talking about FMOD Ex? Why didn’t you post it in that forum then?
You said ‘of course it doesn’t compile’. So is this your bug report? I cant really help if thats all the information you’re giving us.
Maybe you’re trying to use the C++ interface with BCB which doesnt work. Try the C interface.
There is no such thing as “DSP_RawWriteCallback” in fmod 3 or fmod ex so i’m not sure what you’re talking about there.
We have a stream ripping example already done for you in fmodex. You don’t need to re-encode data, that is just wasting quality. The program even dumps out the mp3 files using the tags to name the files.[/quote:2bxpad4g]
I didn’t know I was in the wrong forum …. Anyway it will not compile since all the FSOUND calls are gone …. DSP_RawWriteCallback is a user supplied function of type FSOUND_DSPCALLBACK, which is what I meant, which is missing with FSOUND_STREAM, FSOUND_DSPUNIT et. al.
I am not saying that I can not get it all working, though it would have been nice to have some backward compatibility to the old stuff instead of having to rewrite everything.
I just took a quick look at ripnetsream, I didn’t compile or run it, but it has a global var as a filename it gets from the command line, so everything goes into one big file. Where can it get a new file name from metadata every time the tags change, so that each song can be saved to an individual file. Previously I had FSOUND_Stream_Net_SetMetadataCallback(stream, metacallback, 0); to alert me.
I guess I will just have to bite the bullet, learn the new stuff and rewrite it, perhaps in C++.
So I guess what I am saying that for someone who already has C code in 3.x versions, there is no way but to start messing with debugged code and rewriting it for version 4 or as I think you call it Fmodex
Actually if you look at my previous post I did say I looked at ripnetstream but didn’t compile or run it, which I have now done and it is as I wrote in my previous post, it saves to one big file.
I have fmodapi40033linux which I just downloaded again and compile main.c using make in the examples/ripnetstream directory. The program takes a file name from the command line and saves it all in to this file. With no file name, nothing is saved. Just spent a few seconds looking at the C++ file and it looks like it does the same thing.
Looking at the code I see the for (;;) loop and the call to FMOD_Sound_GetTag so I guess thi is where you get the changed tags and could open and close files, I do not know enough about version 4 to know how else to do it, I’ll have to study it more.
I am running this on an up3dated FC3 system with kernel vmlinuz-2.6.12-1.1372_FC3, every now and again when I do something that is slightly CPU intensive, the sound goes into a 10-15 sound echo loop. It did this a few times and crashed. BTW should this thread be under FMOD_Ex??
[arnold@solwezi ripnetstream]$ ./ripnetstream http://22.214.171.124:80/stream/1040
RipNetStream Example. Copyright (c) Firelight Technologies 2004-2005.
Press space to pause, Esc to quit
icy-notice1 = <BR>This stream requires <a href=”http://www.winamp.com/”>Winamp</a><BR> (73 bytes)
icy-notice2 = SHOUTcast Distributed Network Audio Server/SolarisSparc v1.9.5<BR> (67 bytes)
icy-name = CLUB 977 The 80s Channel (25 bytes)
icy-genre = 80s Pop Rock (13 bytes)
icy-url = http://www.club977.com (23 bytes)
icy-pub = 1 (2 bytes)
icy-br = 128 (4 bytes)
icy-irc = #shoutcast (11 bytes)
icy-icq = 0 (2 bytes)
icy-aim = N/A (4 bytes)
ARTIST = Foreigner (10 bytes)
TITLE = Juke Box Hero (14 bytes)
StreamUrl = (1 bytes)
ARTIST = Club 977 Promo (15 bytes)
TITLE = Advertise on Club 977 The 80s Channel (38 bytes)
ARTIST = Chaka Khan (11 bytes)
TITLE = I Feel For You (15 bytes)
ARTIST = Michael McDonald (17 bytes)
TITLE = I Keep Forgettin’ (18 bytes)
ARTIST = Tom Petty and the Heartbreakers (32 bytes)
TITLE = You got lucky (14 bytes)
ARTIST = Roxette (8 bytes)
TITLE = The Look (9 bytes)
FMOD error! (32) An invalid object handle was used.
Please login first to submit.