diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2006-11-06 18:07:30 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2006-11-06 18:07:30 +0000 |
commit | 0f5cb94aa4a334366a746fcbb22f3335ca413265 (patch) | |
tree | 8f89a96628c1810d51ee9816daf78edb8c76fcd4 /apps/playlist.c | |
parent | 0b22795e26ee09de14f6ac23219adeda12f2fd5b (diff) |
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 'apps/playlist.c')
-rw-r--r-- | apps/playlist.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 5a5313b736..134b52ea8b 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -155,7 +155,7 @@ static int recreate_control(struct playlist_info* playlist); static void update_playlist_filename(struct playlist_info* playlist, const char *dir, const char *file); static int add_indices_to_playlist(struct playlist_info* playlist, - char* buffer, int buflen); + char* buffer, size_t buflen); static int add_track_to_playlist(struct playlist_info* playlist, const char *filename, int position, bool queue, int seek_pos); @@ -457,7 +457,7 @@ static void update_playlist_filename(struct playlist_info* playlist, * calculate track offsets within a playlist file */ static int add_indices_to_playlist(struct playlist_info* playlist, - char* buffer, int buflen) + char* buffer, size_t buflen) { unsigned int nread; unsigned int i = 0; @@ -489,8 +489,7 @@ static int add_indices_to_playlist(struct playlist_info* playlist, buflen = (audiobufend - audiobuf); buffer = (char *)audiobuf; #else - buflen = (audiobufend - audiobuf - talk_get_bufsize()); - buffer = (char *)&audiobuf[talk_get_bufsize()]; + buffer = (char *)audio_get_buffer(false, &buflen); #endif } @@ -1853,7 +1852,7 @@ int playlist_resume(void) { struct playlist_info* playlist = ¤t_playlist; char *buffer; - int buflen; + size_t buflen; int nread; int total_read = 0; int control_file_size = 0; @@ -1866,8 +1865,7 @@ int playlist_resume(void) buflen = (audiobufend - audiobuf); buffer = (char *)audiobuf; #else - buflen = (audiobufend - audiobuf - talk_get_bufsize()); - buffer = (char *)&audiobuf[talk_get_bufsize()]; + buffer = (char *)audio_get_buffer(false, &buflen); #endif empty_playlist(playlist, true); |