summaryrefslogtreecommitdiffstats
path: root/apps/pcmbuf.c
AgeCommit message (Collapse)AuthorFilesLines
2006-11-16Removed muting from pcm buffer during starts, stops and pauses for tlv320 ↵Michael Sevakis1-1/+20
and uda1380. Far less in the way of pops now. Voice during FM radio playback keeps radio steady. If it is determined that other audio codecs don't benefit from this remove the muting code and defines altogether. Saving the state and not resetting more than needed seems to prevent popping more effectively than muting at DMA starts and stops. Voice can click a little if truncating a clip (not annoyingly though) but that should be handled by a DSP fade out over a few ms instead-- a side benefit would be a general DSP fade rather than using volume control. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11538 a1c6a512-1295-4272-9138-f99709370657
2006-11-07Calculation was wrong in pcmbuf_is_same_size such that is would almost ↵Michael Sevakis1-1/+2
certainly return false. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11460 a1c6a512-1295-4272-9138-f99709370657
2006-11-06Big Patch adds primarily: Samplerate and format selection to recording for ↵Michael Sevakis1-8/+19
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-10-15Removed ugly boosting solutions from playback code and let schedulerMiika Pekkarinen1-63/+23
handle unboosting instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11226 a1c6a512-1295-4272-9138-f99709370657
2006-10-15Don't unboost CPU in an ISRSteve Bavin1-9/+12
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11224 a1c6a512-1295-4272-9138-f99709370657
2006-10-13Just take out some out-of-date TODOs from playback.c and put a big FIXME in ↵Brandon Low1-1/+8
pcmbuf.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11217 a1c6a512-1295-4272-9138-f99709370657
2006-10-05Add CPU boost tracker to see where boosts are coming fromSteve Bavin1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11125 a1c6a512-1295-4272-9138-f99709370657
2006-09-27Fix for crossfade crashes if in or out delay are zeroSteve Bavin1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11078 a1c6a512-1295-4272-9138-f99709370657
2006-09-26Fix a crash and CPU being left boosted when using voice - FS#6024Steve Bavin1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11053 a1c6a512-1295-4272-9138-f99709370657
2006-09-17FS#5992 Reworked playback.c to fix voice bugs by Steve Bavin. Fixed toMiika Pekkarinen1-17/+24
work with the new scheduler and handled properly and fast the track skipping. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10966 a1c6a512-1295-4272-9138-f99709370657
2006-09-16New scheduler, with priorities for swcodec platforms. Frequent taskMiika Pekkarinen1-7/+35
switching should be more efficient and tasks are stored in linked lists to eliminate unnecessary task switching to improve performance. Audio should no longer skip on swcodec targets caused by too CPU hungry UI thread or background threads. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
2006-08-13Memory size checks in .c/.h files should use MEM, not MEMORYSIZEDave Chapman1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10557 a1c6a512-1295-4272-9138-f99709370657
2006-08-12Various lower limits and sizes for targets with 1MB of RAM (Iriver iFP7xx).Tomasz Malesinski1-0/+4
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10556 a1c6a512-1295-4272-9138-f99709370657
2006-08-02Adjusted buffer watermarks for better crossfade and playback stability.Miika Pekkarinen1-5/+6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10416 a1c6a512-1295-4272-9138-f99709370657
2006-05-14Correctly enable crossfade mixmode only when not skipping tracksMiika Pekkarinen1-3/+7
manually. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9926 a1c6a512-1295-4272-9138-f99709370657
2006-05-08Revert a previous change, works around the problem of freezing on ↵Brandon Low1-1/+1
stop-while-paused, and skipping with crossfade git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9889 a1c6a512-1295-4272-9138-f99709370657
2006-05-05Hopefully fix some old audio playing during manual track skip w/o crossfade. ↵Brandon Low1-0/+1
Worst case was 1/5 second of audio from pcmbuflen bytes later than the playign position of the old track would play. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9876 a1c6a512-1295-4272-9138-f99709370657
2006-04-25Make crossfade less twitchy moreBrandon Low1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9801 a1c6a512-1295-4272-9138-f99709370657
2006-04-25GOTO POWER. Improve crossfade performance, and cleanliness, and termination ↵Brandon Low1-15/+23
conditions. Make consistent insert vs. request/complete types of buffering. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9800 a1c6a512-1295-4272-9138-f99709370657
2006-04-25Make crossfade less twitchy about buffer levelBrandon Low1-4/+7
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9799 a1c6a512-1295-4272-9138-f99709370657
2006-04-25Fix asymetric crossfade cases that were broken, and also a not yet reported ↵Brandon Low1-42/+72
bug where a buffer underrun during crossfade would take a long time to resume playing git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9798 a1c6a512-1295-4272-9138-f99709370657
2006-04-25Fix crossfade. Again.Brandon Low1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9797 a1c6a512-1295-4272-9138-f99709370657
2006-04-25More crossfade work, should fix crossfade on coldfire, and possibly improve ↵Brandon Low1-87/+82
crossfade performance in some cases. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9796 a1c6a512-1295-4272-9138-f99709370657
2006-04-24Fix another possible glitch causer on crossfadeBrandon Low1-3/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9789 a1c6a512-1295-4272-9138-f99709370657
2006-04-24Fix crossfade locational settingBrandon Low1-0/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9785 a1c6a512-1295-4272-9138-f99709370657
2006-04-24Remove accidentally commited commented code, no functional changesBrandon Low1-15/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9784 a1c6a512-1295-4272-9138-f99709370657
2006-04-23Rework crossfade to properly follow pcmbuf chunks instaed of blindly ↵Brandon Low1-224/+211
inserting into the ring buffer git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9780 a1c6a512-1295-4272-9138-f99709370657
2006-04-23Whoops, forgot to 'duck' the music below the voice when I redid the mixBrandon Low1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9772 a1c6a512-1295-4272-9138-f99709370657
2006-04-22First commit of reworking voice to be mroe stable on swcodecBrandon Low1-49/+81
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9758 a1c6a512-1295-4272-9138-f99709370657
2006-04-20Fix a crossfade problem (not initializing quite right), and a end of track ↵Brandon Low1-10/+16
problem (should solve some problemwith last bits of audio not playing). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9736 a1c6a512-1295-4272-9138-f99709370657
2006-04-14Fix some stop/pause/boost stuffBrandon Low1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9662 a1c6a512-1295-4272-9138-f99709370657
2006-04-13Ensure that the buffer doesn't get out of sync on rebuffer track changes. ↵Brandon Low1-11/+1
Remove the concept of pcmuf_boost_mode as it doesn't seem necessary, and adds an unnecessary way for the CPU to stay boosted. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9646 a1c6a512-1295-4272-9138-f99709370657
2006-04-07Add a comment onlyBrandon Low1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9554 a1c6a512-1295-4272-9138-f99709370657
2006-04-05Fix bug #4896 and make the beep code a bit cleanerBrandon Low1-22/+30
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9514 a1c6a512-1295-4272-9138-f99709370657
2006-04-05More work on swcodec. No significant pcmbuf functions are called from the ↵Brandon Low1-13/+0
audio thread now. Do not be surprised if seek or skip behavior gets weird after this, but it Works for Me (TM), and is a significant step in the right direction. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9510 a1c6a512-1295-4272-9138-f99709370657
2006-03-30New 'Track Skip Only' option for Crossfading; crossfading is disabled except ↵Zakk Roberts1-32/+32
for manual track changes. NOTE: If you were using 'Always' mode previously, check again after updating: you'll now be in the new 'Track Skip Only' mode. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9353 a1c6a512-1295-4272-9138-f99709370657
2006-03-30Add comments, and avoid throw-away calculations in crossfade buffer processBrandon Low1-24/+32
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9352 a1c6a512-1295-4272-9138-f99709370657
2006-03-25Fix lockups people have been having with track skipping during buffer fill, ↵Brandon Low1-0/+8
this is a reversion of a previous commit pending more fixes to playback engine git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9250 a1c6a512-1295-4272-9138-f99709370657
2006-03-24Convert playback.c to use unsigned byte counters, and _minor_ refactoring of ↵Brandon Low1-12/+3
buffer callbacks git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9227 a1c6a512-1295-4272-9138-f99709370657
2006-03-24Fix weirdness caused by not stopping buffering during pause, and generally ↵Brandon Low1-1/+4
use a more sane pause behavior on swcodec targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9221 a1c6a512-1295-4272-9138-f99709370657
2006-02-22Fix some of the voice and beep bugs that people have noticed since my new ↵Brandon Low1-53/+52
pcmbuf code went in, reduce code duplication, and improve performance while I'm at it git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8775 a1c6a512-1295-4272-9138-f99709370657
2006-02-13Add comments, and prevent a nearly impossible wrapping bug. There's always ↵Brandon Low1-8/+11
enough space for the next whole audio chunk now, so it's faster too git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8678 a1c6a512-1295-4272-9138-f99709370657
2006-02-13Don't boost from inside the DMA interrupt, everBrandon Low1-3/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8677 a1c6a512-1295-4272-9138-f99709370657
2006-02-07Rework PCM bufferBrandon Low1-323/+388
* Linked list instead of static array buffer pointers * Variable sized chunks * Improved mix handling * Reduction in duplicated code * Reduced IRAM usage w/o sacrificing performance * Converted to almost entirely unsigned math * Add pause function to reduce pcm_* exposure to playback. This WILL break playback on the iPod until linuxstb makes a followup commit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8612 a1c6a512-1295-4272-9138-f99709370657
2006-02-07Fixed the previous commit.Miika Pekkarinen1-4/+6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8610 a1c6a512-1295-4272-9138-f99709370657
2006-02-07Reduce latency when configuring the EQ.Miika Pekkarinen1-9/+25
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8609 a1c6a512-1295-4272-9138-f99709370657
2006-01-27Don't use crossfader mix mode when skipping tracks manually.Miika Pekkarinen1-3/+7
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8470 a1c6a512-1295-4272-9138-f99709370657
2006-01-22Muting trick to prevent tiny pops and glitchless mp3 seeking.Miika Pekkarinen1-3/+28
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8416 a1c6a512-1295-4272-9138-f99709370657
2006-01-22Initialize callback for safetyBrandon Low1-0/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8411 a1c6a512-1295-4272-9138-f99709370657
2006-01-21Continue to update playback status after decoding is complete (the progress ↵Brandon Low1-16/+23
bar makes it to 100%!) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8407 a1c6a512-1295-4272-9138-f99709370657