Hi ppl, I'm trying to make a project with winNTK that should take a MP3 file,
and parse it to the "audio" soup once the package is downloaded to the newton.
Good news is that it works very well for small MP3 files, up to 100 KB. But it
gives an error ("couldn't activate the package, contact the software
publisher...") for larger files.
here is the code i'm using:
-----------------------------------------
- constants.txt:
DefineGlobalConstant( 'kMySound, {
sndFrameType: 'simpleSound,
samples: loaddatafile("robbie2.mp3",'binary) // put your MP3 file name here,
this assumes that you have that MP3 in the same directory as the project files
} );
-----------------------------------------
- MP3Builder.txt:
SetPartFrameSlot('DoNotInstall, func()
not getroot().|MAD Max:40Hz|);
InstallScript := func(partFrame, removeFrame)
begin
local mySoupDef := {name: "audio",
userName: "audio",
ownerApp: '|MAD Max:40Hz|,
ownerAppName : "MAD Max",
userDescr: "This is the MP3 soup",
indexes: [ {structure: 'slot, path: 'Artist, type: 'string},
{structure: 'slot, path: 'Title, type: 'string},
{structure: 'slot, path: 'Album, type: 'string}]
};
myUsoup := RegUnionSoup( '|MAD Max:40Hz|, mySoupDef);
kSoupEntry := {class: 'MP3Data,
title: "otra prueba2 ", //Modify the Title, Artist and album fields acording to
your song
artist: "artista de prueba 2",
album: "Album de prueba 2",
codec: "MP3",
MP3Data: kMySound
};
MyUsoup:AddToDefaultStoreXmit(ksoupEntry,nil);
end
-------------------------------------------
Any hint would be appreciated.
Daniel Padilla
-- Read the List FAQ/Etiquette: http://www.newtontalk.net/faq.html Read the Newton FAQ: http://www.guns-media.com/mirrors/newton/faq/ This is the NewtonTalk mailing list - http://www.newtontalk.net
This archive was generated by hypermail 2.1.2 : Tue Apr 02 2002 - 14:02:57 EST