summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
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);