summaryrefslogtreecommitdiff
path: root/apps/playlist.c
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 /apps/playlist.c
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 'apps/playlist.c')
-rw-r--r--apps/playlist.c12
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);
155static void update_playlist_filename(struct playlist_info* playlist, 155static void update_playlist_filename(struct playlist_info* playlist,
156 const char *dir, const char *file); 156 const char *dir, const char *file);
157static int add_indices_to_playlist(struct playlist_info* playlist, 157static int add_indices_to_playlist(struct playlist_info* playlist,
158 char* buffer, int buflen); 158 char* buffer, size_t buflen);
159static int add_track_to_playlist(struct playlist_info* playlist, 159static int add_track_to_playlist(struct playlist_info* playlist,
160 const char *filename, int position, 160 const char *filename, int position,
161 bool queue, int seek_pos); 161 bool queue, int seek_pos);
@@ -457,7 +457,7 @@ static void update_playlist_filename(struct playlist_info* playlist,
457 * calculate track offsets within a playlist file 457 * calculate track offsets within a playlist file
458 */ 458 */
459static int add_indices_to_playlist(struct playlist_info* playlist, 459static int add_indices_to_playlist(struct playlist_info* playlist,
460 char* buffer, int buflen) 460 char* buffer, size_t buflen)
461{ 461{
462 unsigned int nread; 462 unsigned int nread;
463 unsigned int i = 0; 463 unsigned int i = 0;
@@ -489,8 +489,7 @@ static int add_indices_to_playlist(struct playlist_info* playlist,
489 buflen = (audiobufend - audiobuf); 489 buflen = (audiobufend - audiobuf);
490 buffer = (char *)audiobuf; 490 buffer = (char *)audiobuf;
491#else 491#else
492 buflen = (audiobufend - audiobuf - talk_get_bufsize()); 492 buffer = (char *)audio_get_buffer(false, &buflen);
493 buffer = (char *)&audiobuf[talk_get_bufsize()];
494#endif 493#endif
495 } 494 }
496 495
@@ -1853,7 +1852,7 @@ int playlist_resume(void)
1853{ 1852{
1854 struct playlist_info* playlist = &current_playlist; 1853 struct playlist_info* playlist = &current_playlist;
1855 char *buffer; 1854 char *buffer;
1856 int buflen; 1855 size_t buflen;
1857 int nread; 1856 int nread;
1858 int total_read = 0; 1857 int total_read = 0;
1859 int control_file_size = 0; 1858 int control_file_size = 0;
@@ -1866,8 +1865,7 @@ int playlist_resume(void)
1866 buflen = (audiobufend - audiobuf); 1865 buflen = (audiobufend - audiobuf);
1867 buffer = (char *)audiobuf; 1866 buffer = (char *)audiobuf;
1868#else 1867#else
1869 buflen = (audiobufend - audiobuf - talk_get_bufsize()); 1868 buffer = (char *)audio_get_buffer(false, &buflen);
1870 buffer = (char *)&audiobuf[talk_get_bufsize()];
1871#endif 1869#endif
1872 1870
1873 empty_playlist(playlist, true); 1871 empty_playlist(playlist, true);