summaryrefslogtreecommitdiff
path: root/apps/recorder/pcm_record.c
AgeCommit message (Collapse)Author
2011-11-29FS#12412 : Delete old buffer allocation code which has been replaced by ↵Boris Gjenero
core_alloc, and move buffer setup code to core_alloc.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31088 a1c6a512-1295-4272-9138-f99709370657
2011-10-15Revert 30754 because the codecs won't build correctly, anyway.Fred Bauer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30755 a1c6a512-1295-4272-9138-f99709370657
2011-10-14undef DEBUG in pcm_record.c because it's broken and breaks DEBUG buildsFred Bauer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30754 a1c6a512-1295-4272-9138-f99709370657
2011-08-14Fix errors and warnings.Thomas Martitz
The buffer_offset paramter of audio_init_recording() is removed as it was unused in both implementations. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30310 a1c6a512-1295-4272-9138-f99709370657
2011-08-14GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.Thomas Martitz
Namely, introduce buffer_get_buffer() and buffer_release_buffer(). buffer_get_buffer() aquires all available and grabs a lock, attempting to call buffer_alloc() or buffer_get_buffer() while this lock is locked will cause a panicf() (doesn't actually happen, but is for debugging purpose). buffer_release_buffer() unlocks that lock and can additionally increment the audiobuf buffer to make an allocation. Pass 0 to only unlock if buffer was used temporarily only. buffer_available() is a replacement function to query audiobuflen, i.e. what's left in the buffer. Buffer init is moved up in the init chain and handles ipodvideo64mb internally. Further changes happened to mp3data.c and talk.c as to not call the above API functions, but get the buffer from callers. The caller is the audio system which has the buffer lock while mp3data.c and talk mess with the buffer. mpeg.c now implements some buffer related functions of playback.h, especially audio_get_buffer(), allowing to reduce #ifdef hell a tiny bit. audiobuf and audiobufend are local to buffer.c now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30308 a1c6a512-1295-4272-9138-f99709370657
2011-03-05Change the thread api a bit.Thomas Martitz
* Remove THREAD_ID_CURRENT macro in favor of a thread_self() function, this allows thread functions to be simpler. * thread_self_entry() shortcut for kernel.c. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29521 a1c6a512-1295-4272-9138-f99709370657
2011-02-23Give playback engine better control over the codec. Codec simply follows ↵Michael Sevakis
commands and doesn't concern itself with audio state. Get track change notification in on the actual last buffer insert of the track because now audio simply waits for a track change notify from PCM on the last track and it must be sent reliably. This is still at an intermediate stage but works. Codecs and plugins become incompatible. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29387 a1c6a512-1295-4272-9138-f99709370657
2011-02-02Clean up multiple definitions of RAM size. Remove -DMEM (make) and MEM ↵Andree Buschmann
(code), use the already defined MEMORYSIZE instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29189 a1c6a512-1295-4272-9138-f99709370657
2010-08-12Introduce NORETURN_ATTR wrapper for __attribute__((noreturn)), using this ↵Thomas Martitz
and a bit further cleanup in main gets rid of a warning when compiling for android. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27788 a1c6a512-1295-4272-9138-f99709370657
2010-07-04Simulator: build recording codeRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27280 a1c6a512-1295-4272-9138-f99709370657
2010-06-26e200v1/c200v1: Implement limited samplerate switching. Rates 24kHz and below ↵Michael Sevakis
are being a bear as far as minor crackling at higher amplitude-- leave them out for the time being since no solution is currently evident. 48, 44, 32 (rec rates 24, 22, 16) seem perfectly fine. I'm betting c200 is ok to include because it uses the same setup as e200. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27139 a1c6a512-1295-4272-9138-f99709370657
2010-05-24Make PCM->driver interface about as simple as it will get. Registered ↵Michael Sevakis
callback, zero data, alignment and stops are handled entirely inside pcm.c; driver merely calls fixed pcm.c callback. Remove pcm_record_more and do it just like playback; the original reason behind it isn't very practical in general. Everything checks out on supported targets. There wer some compat changes I can't check out on many unsupoorted but if there's a problem it will be a minor oops. Plugins become incompatible due to recording tweak-- full update. Sorted API. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26253 a1c6a512-1295-4272-9138-f99709370657
2010-05-16FS#11263 - Radio Art support! %C and %Cl tags work in the radio screen and ↵Jonathan Gordon
Base Skin when the radio is running. put your station images in .rockbox/fmpresets/<preset name>.bmp or .jpg. Must be in preset mode and the preset name must match the filename git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26078 a1c6a512-1295-4272-9138-f99709370657
2010-05-14Enable recording on clipv1/m200v4/c200v2Rafaël Carré
Use smaller recording buffer and watermarks on these models with 2MB of ram Rearrange watermark calculation expressions so we can use fractional numbers of seconds but still with integer results Only enable spinup time adjustement for ATA targets Flash targets (sansas and ondiofm) should still work fine, but they were not tested git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26014 a1c6a512-1295-4272-9138-f99709370657
2010-01-03Fix further tabsAndree Buschmann
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24156 a1c6a512-1295-4272-9138-f99709370657
2009-07-14FS#10080Nils Wallménius
* Move strncpy() from core to the pluginlib * Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins * Drop strncpy() from the codec api as no codec used it * Bump codec and plugin api versions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
2009-02-08Gigabeat S: Implement an SDMA API and use it in the PCM driver. Some other ↵Michael Sevakis
miscellaneous adjustments to recording and PCM buffer to accomodate use of physical addresses and cache coherency. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19949 a1c6a512-1295-4272-9138-f99709370657
2008-12-13Keyclick fixup take two. It is only 88 samples (2msec) long so keep a small ↵Michael Sevakis
static buffer around for beeps less than or equal to keyclick duration. This way it operates no matter the buffer state and still won't interfere with alternate PCM operations like recording or plugin playback. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19415 a1c6a512-1295-4272-9138-f99709370657
2008-12-13PCM buffer beeping needs the audio buffer reset in order to work after ↵Michael Sevakis
operations that trash the buffer or keyclick won't be audible until playback is restarted. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19413 a1c6a512-1295-4272-9138-f99709370657
2008-12-10Fix red and a couple other things I somehow missed.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19378 a1c6a512-1295-4272-9138-f99709370657
2008-12-10Use cookies for thread identification instead of pointers directly which ↵Michael Sevakis
gives a buffer against wrongly identifying a thread when the slot is recycled (which has been nagging me for awhile). A slot gets 255 uses before it repeats. Everything gets incompatible so a full update is required. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19377 a1c6a512-1295-4272-9138-f99709370657
2008-11-01Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do ↵Frank Gevaerts
that, it also introduces sd_*, nand_*, and mmc_*. This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
2008-10-15Split id3.c/h into metadata.c/h and metadata/mp3.c. Updated all references. ↵Björn Stenberg
Moved mp3data.c/h from firmware to apps. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18814 a1c6a512-1295-4272-9138-f99709370657
2008-10-14Moved pcm_record from firmware to apps. Cleaned up some. Now all code using ↵Björn Stenberg
struct mp3entry is in apps. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18807 a1c6a512-1295-4272-9138-f99709370657