|
Rockbox mail archiveSubject: few remaining issues for memory playback, plugin APIfew remaining issues for memory playback, plugin API
From: [IDC]Dragon <idc-dragon_at_gmx.de>
Date: Sun, 11 Jan 2004 09:07:24 +0100 (MET) Hi, I've completed the "outsourcing" of the hardware dependent playback functions into the new module mp3_playback.c. The recording is still in mpeg.c, I didn't like modifying that. The other remaining dirty part is that it still calls a function playback_tick() in mpeg.c to maintain the "elapsed" member. I have prepared a new function pair mp3_get_playtime() / mp3_reset_playtime() to query the playback time instead, but it is not used yet. To test it, I have exported the mp3_xxx functions to the plugin API and made a proof-of-concept plugin which is able to play mp3, hooray! A few easy issues remain, I'd like to discuss how to proceed with them: - When a plugin plays mp3 data, playback_tick() is still called. It writes in some entry which is not used, since mpeg.c is not playing, but this is dirty. We should use the new mp3 playtime functions, but there are so many references to that "elapsed" member. The simulator also updates it to pretend playback. - When a plugin plays, the volume is at zero / muted. I don't know why, the fade out code sets it to the configured value again when done with fade out and stop. The way I read the code it should still be set in idle state. As a consequence, we either need to fix that, or the plugin must be able to set the configured volume. We could give the plugins access to the config struct, but that raises another issue: we'd have tomake the plugins incompatible every time the config struct layout is changed. On the other hand, such access may be beneficial. These issues could be solved with wrapper code for plugin playback, such that the volume is set again when a plugin wants to play, and set a flag that prevents calling of playback_tick(). But I don't like that too much, don't want to create special cases. What do you think? Other functions I have exported in my private buils are a new one for mp3 buffer access (stopping the playback to prevent collisions), mpeg_sound_set() and bitswap(). I'd like to export something for backlight manipulation, and some code in plugin.c to restore the backlight when the plugin has ended, in case it "forgets" about it. Anything else? Jörg -- +++ GMX - die erste Adresse für Mail, Message, More +++ Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.netReceived on 2004-01-11 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |