[quote="/Chris":1ecvnpx0]I’ve translated the VB module to Delphi and made a working Lame sample.
It’s using a DSP-callback
Download it [url]http://home.tiscali.nl/tanaskoski/MP3Delphi.zip]Here[/url][/url][/quote:1ecvnpx0]
The right link: [url:1ecvnpx0]http://home.tiscali.nl/tanaskoski/MP3Delphi.zip[/url:1ecvnpx0]
- Chris answered 15 years ago
Ok, I’ve looked at your example and wrote a DSP callback, but what I’m having trouble with is writing to a file. Whenever I write to a file it opens it, writes a chunk of data, and then closes it. But then when I open it again to write another chunk of data it erases all the data that was there before. So, I’m having trouble writing to a file inside a DSP callback, because unlike your example I’m not dealing with a sample, but with a stream, so I can’t use Lock and Unlock etc. to access the pcm data. Is there a way in VB to write to the end of the file instead of writing over all other data?
Ok, I’m having more problems with MP3 encoding in VB. I posted my example and I was wondering if you (KarLKoX) could take a look at it. The problem I’m having isnt with Lame, but whenever I start encoding I get an ilegal operation error with FMOD. And afterwards the output MP3 file is 392 Bytes, so I know its writing something out! :-?. [url=http://members.aol.com/libertyed1986/MP3Encoder.zip:23882dam]Heres[/url:23882dam] the link. Thanks!
[url=http://starnetasso.free.fr/Upload/MP3Encoder.rar:12fvoebi]Here[/url:12fvoebi] is the updated version, no more craches 😀
In case you didn’t read comments :
– Lame is updated to 3.95 (previously it was 3.91),
– Lame is now in __stdcall naming convention,
– Lame needs short int (integer from +- 32768) so don’t use the fpu mixer,
– I don’t know how to get more than 1024 samples in a DSP (even when i increase the buffersize), the mp3 is shorter than the original.
Not built into FMOD, no, but it wouldn’t be hard to feed BladeEnc.dll or lame_enc.dll from a DSP unit while the CDDA stream is playing. A good place to start would be the FMOD cddarip example. Instead of just doing an fwrite in the DSP callback, you’d pass the chunk of data to BladeEnc or lame.
hmmm, I’m still getting the “Bad DLL calling convention” error. Maybe it has to do with the module I wrote. I just converted it from your purebasic example into VB. Have a look at it [url=http://members.aol.com/libertyed1986/modLAME.bas:3658welz]Here[/url:3658welz].
[quote="JediKnight":2aigj53f]User NERO Burning ROM (http://www.nero.com)
You can extract audio digitally, and save it directly in MP3
NERO has a built-in MP3 encoder :)[/quote:2aigj53f]
lol ! He want to code it using fmod and the lame encoder and he is not searching for a tool doing cdda extraction
Btw, eac is a better choice 😉
[quote="KarLKoX":51yw1ei6]yes, it works, perhaps you have another lame_enc.dll in your path ?Normally, the [url=http://starnetasso.free.fr/Upload/EncoderVB.rar:51yw1ei6]example[/url:51yw1ei6] i wrote must work.[/quote:51yw1ei6]
do you have an idea why i can’t get the WriteTagV1(ByVal fichier As String, Optional bRemove As Boolean = False) of your example, to work?
the WriteTagV2 is working like charm! but the WriteTagV1 simple don’t want
to write the TAGs to the file (fichier = the same path as in the working V2 procedure and the TAGs are filled with example values) the V1 tag is also disabled when i take a look at the TAGs in winamp for example. any ideas?
- Anonymous answered 15 years ago
Please login first to submit.