MP3Decoder ID3-Tags Cover Problem

Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.
Post Reply
Fridolin
Senior User
Posts: 20
Joined: Mon 2015-11-30 12:54

MP3Decoder ID3-Tags Cover Problem

Post by Fridolin » Wed 2017-11-08 9:49

Hello,

I have problems Playing MP3-Files, which include a cover in id3-Tags.

The decoder returns 6 and is not able to play the audio-file.
If I remove the cover from the file, it runs without problem.

Do you have an Idea?

Thanks!
Greetings
Fridolin

Code snipped of decoding

Code: Select all

auDec = CreateAudioDecoder(auDecLib, inFp, stdaudioout, NULL, auDecFGuess);
if(!auDec) {
	result = S_ERROR;
	goto finally;
}

eCode = DecodeAudio(auDecLib, auDec, &eStr);
	
#ifdef DEBUG_MP3_THREAD_ISENABLED	
	uart_debug("dec returns ");
	sprintf(debug_buff,"%d, \"%s\"", eCode, eStr ? eStr : "(null)");
	uart_debug(debug_buff);
	uart_debug("\n");
#endif


User avatar
pasi
VLSI Staff
Posts: 1435
Joined: Thu 2010-07-15 16:04

Re: MP3Decoder ID3-Tags Cover Problem

Post by pasi » Thu 2017-11-09 11:47

ID3 tag should be jumped over automatically. Can you provide the file you're having trouble with?
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Fridolin
Senior User
Posts: 20
Joined: Mon 2015-11-30 12:54

Re: MP3Decoder ID3-Tags Cover Problem

Post by Fridolin » Thu 2017-11-09 14:04

Hello Pasi,

yes of course. See attached File.

Thanks.
Attachments
01 - Mashup-Germany - Farewell to the 90s (Intro).mp3
(10.27 MiB) Downloaded 14 times

User avatar
Henrik
VLSI Staff
Posts: 1090
Joined: Tue 2010-06-22 14:10

Re: MP3Decoder ID3-Tags Cover Problem

Post by Henrik » Thu 2017-11-09 15:22

Hello!

I can confirm the issue. I am looking at it now.

Kind regards,
- Henrik
Good signatures never die. They just fade away.

User avatar
Henrik
VLSI Staff
Posts: 1090
Joined: Tue 2010-06-22 14:10

Re: MP3Decoder ID3-Tags Cover Problem

Post by Henrik » Thu 2017-11-09 15:35

Ok,

there was an error in the library audiodec.dl3. If the total size of the ID3v2 tag was 2 MiB or larger, the library would calculate the tag's size completely wrong and bad things would happen. Your ID3v2 tag was almost 7 MiB so it easily broke that barrier.

Please find attached to this message a corrected version of audiodec.dl3. Copy this to your S:SYS/directory and you should be good to go!

Our next official release will naturally contain the corrected version. Thanks for the report, and for the helpful example file!

Kind regards,
- Henrik
Attachments
audiodec.zip
Corrected version of audiodec.dl3 that can play also files that have an ID3v2 tag with a total size of 2 MiB or larger.
(4.32 KiB) Downloaded 12 times
Good signatures never die. They just fade away.

Fridolin
Senior User
Posts: 20
Joined: Mon 2015-11-30 12:54

Re: MP3Decoder ID3-Tags Cover Problem

Post by Fridolin » Mon 2017-11-13 12:02

Hello Henrik,

thanks for your support. But I can't use the new version, I run out of mem now. :cry:

Is it possible to make a slim version.

Thanks
Fridolin

User avatar
Henrik
VLSI Staff
Posts: 1090
Joined: Tue 2010-06-22 14:10

Re: MP3Decoder ID3-Tags Cover Problem

Post by Henrik » Mon 2017-11-13 14:17

Hello!

It is very weird that you run out of memory. The version I made was exactly the same size as the last official release.

VSOS_342_RootAndLibrariesSourceCode.zip contains this audiodec.dl3:
I: 1396 words; 5584 bytes code memory
X: 164 words; 328 bytes X data memory
Y: 49 words; 98 bytes Y data memory

My fixed audiodec.dl3:
I: 1396 words; 5584 bytes code memory
X: 164 words; 328 bytes X data memory
Y: 49 words; 98 bytes Y data memory

Were you using perhaps some older, smaller version?

Anyhow, I've made a size-optimized version with exactly the same functionality. It's attached to this message. Its size is:

I: 1207 words; 4828 bytes code memory
X: 192 words; 384 bytes X data memory
Y: 133 words; 266 bytes Y data memory

Does this help you?

If even this version is too big, perhaps we'll have to think of a reduced functionality version. Or see, if you can reduce the amount of concurrent libraries / code in memory.

Kind regards,
- Henrik
Attachments
audiodecsmaller.zip
Smaller, fixed version of audiodec.dl3
(4.2 KiB) Downloaded 10 times
Good signatures never die. They just fade away.

User avatar
Henrik
VLSI Staff
Posts: 1090
Joined: Tue 2010-06-22 14:10

Re: MP3Decoder ID3-Tags Cover Problem

Post by Henrik » Tue 2017-11-14 10:00

Hello again,

to help you out I made yet another version of audiodec.dl3. This forsakes some functionality for absolute smallest size. Some of its features are:
- Can play only files, not non-seekable streams
- No smooth pause fade in / out
- Less fine-grained CPU control
- Cannot control audio buffer size (some hi-res codecs may not play properly)
- Cannot play consecutive Ogg Vorbis files seamlessly

Its size is:
I: 750 words; 3000 bytes code memory
X: 180 words; 360 bytes X data memory
Y: 133 words; 266 bytes Y data memory

Kind regards,
- Henrik
Attachments
audiodecsmallest.zip
Very small audiodec.dl3 with reduced functionality
(2.75 KiB) Downloaded 10 times
Good signatures never die. They just fade away.

Post Reply