summaryrefslogtreecommitdiff
path: root/apps/playback.c
AgeCommit message (Collapse)Author
2007-02-24SWCODEC: Dsp speed optimizations. Changes for more modularity. Removal of ↵Michael Sevakis
some usless stuff. Some assembly routines for Coldfire with speed in mind over size for the outputs but the channel modes remain compact. Miscellaneous coldfire asm updates to accomodate the changes. Codec API structure version has to increase so do a full update. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12472 a1c6a512-1295-4272-9138-f99709370657
2007-02-18really fix red builds this timeJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12380 a1c6a512-1295-4272-9138-f99709370657
2007-02-16SWCODEC: Remove the last quirks when upsampling.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12336 a1c6a512-1295-4272-9138-f99709370657
2007-02-15Fix a bug where the CPU stays boosted when the voice is activatedLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12314 a1c6a512-1295-4272-9138-f99709370657
2007-02-14Cuesheet support by Jonathan Gordon and me (FS #6460).Nicolas Pennequin
Everytime an audio file is loaded, a cue file with the same name is searched for. A setting allows to disable this (default is off). Cuesheet files can also be viewed in the file browser. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12304 a1c6a512-1295-4272-9138-f99709370657
2007-02-10SWCODEC: Annoying neatness update. Use intptr_t for codec_configure_callback ↵Michael Sevakis
and dsp_configure and stop all the silly type casting of intergral types to pointers to set dsp configuration and watermarks. Shouldn't have any effect on already compiled codecs at all. Will fix any important patches in the tracker so they compile. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12259 a1c6a512-1295-4272-9138-f99709370657
2007-02-09Add Speex playback support. Patch from FS #5607 thanks to Frederik Vestre.Dan Everton
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12241 a1c6a512-1295-4272-9138-f99709370657
2007-02-07Fix resampling clicking as much as possible at the moment. 1) Upsampling ↵Michael Sevakis
clicked because of size inaccuracies returned by DSP. Fix by simplifying audio system to use per-channel sample count from codec to pcm buffer. 2) Downsampling affected by 1) and was often starting passed the end of the data when not enough was available to generate an output sample. Fix by clamping input range to last sample in buffer and using the last sample value in the buffer. A perfect fix will require a double buffering scheme on the resampler to sufficient data during small data transients on both ends at all times of the down ratio on input and the up ratio on output. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12218 a1c6a512-1295-4272-9138-f99709370657
2007-01-27Fix a potential voice related bug with first time buffer setupBrandon Low
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12125 a1c6a512-1295-4272-9138-f99709370657
2007-01-26No functional changes. Code police and comment clarity improvements.Brandon Low
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12120 a1c6a512-1295-4272-9138-f99709370657
2006-12-25Next round of static'ing and related fixes.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11836 a1c6a512-1295-4272-9138-f99709370657
2006-12-19Convert queues to use intptr_t for event data and return values as most of ↵Michael Sevakis
the time pointer are not passed and it should make some things a bit cleaner. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11818 a1c6a512-1295-4272-9138-f99709370657
2006-12-19Accept FS#5344 by Mike Schmitt. Add a "shuffle and track skip" option toJonathan Gordon
crossfade. Bumps config versino, so SAVE SETTINGS before updating. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11811 a1c6a512-1295-4272-9138-f99709370657
2006-12-17Attempt at fixing 64-bit sim warning.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11788 a1c6a512-1295-4272-9138-f99709370657
2006-12-16Commit the kinds of changes that queue_send is mean for.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11778 a1c6a512-1295-4272-9138-f99709370657
2006-12-06Fix an errant #if effecting targets with MEM <= 8Mark Arigo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11677 a1c6a512-1295-4272-9138-f99709370657
2006-12-06Fix settings not saving to disk correctly, (fixes FS#6408)Jonathan Gordon
Stop playback.c requesting a rebuffer while not playing Shutting down from inside the menu will now save settings to disk, and entering the main menu will not force a setting save unless a setting actually changes git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11674 a1c6a512-1295-4272-9138-f99709370657
2006-11-28SWCODEC: Audio-related threads must be free of further tasks before ↵Michael Sevakis
returning buffers. Cleanup declarations of related functions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11618 a1c6a512-1295-4272-9138-f99709370657
2006-11-27Avoid calls to audio and talk functions in audio_get_buffer until init is ↵Michael Sevakis
complete. Just good hygiene really. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11615 a1c6a512-1295-4272-9138-f99709370657
2006-11-26SWCODEC: Stop clicks between tracks when resampler is active by only ↵Michael Sevakis
switching the DSP frequency and not resetting the resampler at track boundaries. Will make sure DSP is correctly flushed at dicontinuities but don't hear any problems currently. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11600 a1c6a512-1295-4272-9138-f99709370657
2006-11-22Audio bugfixes. Should wait for voice codec to reload before returning ↵Michael Sevakis
buffer when stealing voice. Certain variables that get or may get used during an IRQ should be declared 'volatile'. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11572 a1c6a512-1295-4272-9138-f99709370657
2006-11-22Change if CONFIG_CPU==PP50XX to ifdef CPU_PP where appropriateDaniel Ankers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11569 a1c6a512-1295-4272-9138-f99709370657
2006-11-18SWCODEC/IRAM: Save voice IRAM when a plugin initializes its IRAM. Defines ↵Michael Sevakis
two macros for declaring and initializing IRAM. Plugins should use these instead. See mp3_encoder, doom, etc. for details. Further tweaks in buffer restoration after other use. Hiding of some interfaces that should only be used by buffer management. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11544 a1c6a512-1295-4272-9138-f99709370657
2006-11-16Fix alignment issue that caused data aborts on arm targetsMark Arigo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11540 a1c6a512-1295-4272-9138-f99709370657
2006-11-14Strip APE tags during buffering so they do not break MP3 gapless playback.Mark Arigo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11525 a1c6a512-1295-4272-9138-f99709370657
2006-11-14Removed anachronisms introduced with low battery shutdown patch.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11524 a1c6a512-1295-4272-9138-f99709370657
2006-11-13Minor voice fixes; prevent voice queue overflow, fix compile of voice-less buildSteve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11521 a1c6a512-1295-4272-9138-f99709370657
2006-11-11Thread API enhancements.Brandon Low
1) block_thread -> block_thread + block_thread_w_tmo -- this call was always used in distinct ways so having one call with a conditional was ugly. 2) enhance Slasheri's scheduler controlled boost concept. now any thread may trigger a boost which will last until that thread next sleeps. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11509 a1c6a512-1295-4272-9138-f99709370657
2006-11-10Ooops, adapt playback.c to the new IRAM distribution on X5. Codec IRAM is ↵Jens Arnold
defined in more than one place... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11495 a1c6a512-1295-4272-9138-f99709370657
2006-11-09Added macros controlling what goes to IRAM on different targets.Tomasz Malesinski
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11483 a1c6a512-1295-4272-9138-f99709370657
2006-11-08fix booboo in ata.c (SYS_POWEROFF falling into SYS_USB_CONNECTED)Jonathan Gordon
enable ata_idle callbacks in ata_mmc.c (calls the callbacks after 10s of real inactivity) fix builds git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11462 a1c6a512-1295-4272-9138-f99709370657
2006-11-08* changes to ata.c - idle callbacks are called after 2 sec of real idle,Jonathan Gordon
and shutdown and usb (it makes sense here). ata_sleep doesnt get broken by callbacks. * allow ata_sleep() at the end of buffering again * config block uses ata_idle instead of delayed sector when saving * remove delayed sector code from ata_mmc.c (idle callbacks are not yet implemented for ata_mmc.c tho) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11461 a1c6a512-1295-4272-9138-f99709370657
2006-11-07allow the nano to rebuffer on "disk" spindown, seems to be fineJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11457 a1c6a512-1295-4272-9138-f99709370657
2006-11-06Big Patch adds primarily: Samplerate and format selection to recording for ↵Michael Sevakis
SWCODEC. Supprort for samplerates changing in playback (just goes with the recording part inseparably). Samplerates to all encoders. Encoders can be configured individually on a menu specific to the encoder in the recording menu. File creation is delayed until flush time to reduce spinups when splitting. Misc: statusbar icons for numbers are individual digits to display any number. Audio buffer was rearranged to maximize memory available to recording and properly reinitialized when trashed. ColdFire PCM stuff moved to target tree to avoid a complicated mess when adding samplerate switching. Some needed API changes and to neaten up growing gap between hardware and software codecs. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11452 a1c6a512-1295-4272-9138-f99709370657
2006-11-06adds ata_idle_notify system which allows callbacks in apps/ to be calledJonathan Gordon
when the hard disk is idle but spinning, and just before shutting down. on SWCODEC targets with > 8MB RAM the playback engine will try to refill the buffer if it is less than 75% full while the disk is spinning (temporarily disabled on the nano) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11451 a1c6a512-1295-4272-9138-f99709370657
2006-11-02A better fix for the crossfade setting crash (with no global variables added)Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11415 a1c6a512-1295-4272-9138-f99709370657
2006-11-01Remove unwanted logfSteve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11414 a1c6a512-1295-4272-9138-f99709370657
2006-11-01Fix up non-voice build and stop crashes if crossfade settings changed during ↵Steve Bavin
playback git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11413 a1c6a512-1295-4272-9138-f99709370657
2006-10-30Improve accuracy a little when seeking and resuming MP3 files. Mainly ↵Magnus Holmgren
noticable for low-bitrate files with large ID3V2 tags, and no effect if no ID3V2 tag. Should be ported to hwcodec targets. :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11402 a1c6a512-1295-4272-9138-f99709370657
2006-10-30Little tidy-up - track_changed is now only updated on the audio threadSteve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11400 a1c6a512-1295-4272-9138-f99709370657
2006-10-30Rearrange and comment variable declarations; no functional changeSteve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11391 a1c6a512-1295-4272-9138-f99709370657
2006-10-27Do not flood the queue with unnecessary fill buffer requests at the end of a ↵Mark Arigo
playlist. Should fix the stopping bug in FS#6117. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11366 a1c6a512-1295-4272-9138-f99709370657
2006-10-26Revert this morning's change as it can cause old metadata to be reused ↵Steve Bavin
inapproprately. A better fix coming later. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11353 a1c6a512-1295-4272-9138-f99709370657
2006-10-26Don't clear previous track details during playback so the progress bar works ↵Steve Bavin
properly at track transition git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11350 a1c6a512-1295-4272-9138-f99709370657
2006-10-25ifdef all the tagcache code, allows rombox to be compiled again, Thanks ↵Jonathan Gordon
Austin Appel git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11338 a1c6a512-1295-4272-9138-f99709370657
2006-10-25A bit more voice simplification/MAS fixage (FS#6241). Also clear any ↵Steve Bavin
buffered voice when playback is started. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11334 a1c6a512-1295-4272-9138-f99709370657
2006-10-25Only flush PCM buffered voice data when explicitly told to. Patch by ↵Steve Bavin
Stephane Doyen. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11331 a1c6a512-1295-4272-9138-f99709370657
2006-10-23Fix FS 6205: id3v1 stripping messed up rebuffer_and_seeks. Add an assurance ↵Brandon Low
check JinC other things mess it up, more graceful recovery. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11318 a1c6a512-1295-4272-9138-f99709370657
2006-10-23Last fix was wrong, I did the math this time, should fix more buffering edgesBrandon Low
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11315 a1c6a512-1295-4272-9138-f99709370657
2006-10-22Fix edge case handling for buffer writing into the playing track; Improve ↵Brandon Low
comments and variable naming git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11311 a1c6a512-1295-4272-9138-f99709370657