summaryrefslogtreecommitdiff
path: root/firmware/export/pcm_playback.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2006-11-06 18:07:30 +0000
committerMichael Sevakis <jethead71@rockbox.org>2006-11-06 18:07:30 +0000
commit0f5cb94aa4a334366a746fcbb22f3335ca413265 (patch)
tree8f89a96628c1810d51ee9816daf78edb8c76fcd4 /firmware/export/pcm_playback.h
parent0b22795e26ee09de14f6ac23219adeda12f2fd5b (diff)
downloadrockbox-0f5cb94aa4a334366a746fcbb22f3335ca413265.tar.gz
rockbox-0f5cb94aa4a334366a746fcbb22f3335ca413265.zip
Big Patch adds primarily: Samplerate and format selection to recording for 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
Diffstat (limited to 'firmware/export/pcm_playback.h')
-rw-r--r--firmware/export/pcm_playback.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/firmware/export/pcm_playback.h b/firmware/export/pcm_playback.h
index a4cd93969b..9c3e96ba63 100644
--- a/firmware/export/pcm_playback.h
+++ b/firmware/export/pcm_playback.h
@@ -19,11 +19,23 @@
19#ifndef PCM_PLAYBACK_H 19#ifndef PCM_PLAYBACK_H
20#define PCM_PLAYBACK_H 20#define PCM_PLAYBACK_H
21 21
22#include <sys/types.h>
23
24/* Typedef for registered callback (play and record) */
25typedef void (*pcm_more_callback_type)(unsigned char **start,
26 size_t *size);
27
22void pcm_init(void); 28void pcm_init(void);
29
30/* set the pcm frequency - use values in hw_sampr_list
31 * use -1 for the default frequency
32 */
23void pcm_set_frequency(unsigned int frequency); 33void pcm_set_frequency(unsigned int frequency);
34/* apply settings to hardware immediately */
35void pcm_apply_settings(bool reset);
24 36
25/* This is for playing "raw" PCM data */ 37/* This is for playing "raw" PCM data */
26void pcm_play_data(void (*get_more)(unsigned char** start, size_t* size), 38void pcm_play_data(pcm_more_callback_type get_more,
27 unsigned char* start, size_t size); 39 unsigned char* start, size_t size);
28 40
29void pcm_calculate_peaks(int *left, int *right); 41void pcm_calculate_peaks(int *left, int *right);
@@ -35,4 +47,4 @@ void pcm_play_pause(bool play);
35bool pcm_is_paused(void); 47bool pcm_is_paused(void);
36bool pcm_is_playing(void); 48bool pcm_is_playing(void);
37 49
38#endif 50#endif /* PCM_PLAYBACK_H */