Enlightenment CVS committal

Author  : tsauerbeck
Project : misc
Module  : eplayer

Dir     : misc/eplayer/src


Modified Files:
        plugin.h track.c 


Log Message:
Cleaned up input plugin buffer handling.
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/plugin.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- plugin.h    24 Oct 2003 11:38:48 -0000      1.2
+++ plugin.h    9 Nov 2003 14:43:02 -0000       1.3
@@ -29,7 +29,7 @@
        int (*get_channels)();
        int (*get_sample_rate)();
        
-       int (*read)(unsigned char *buf, int len);
+       int (*read)(unsigned char **buf);
 
        int (*get_current_pos)();
        void (*set_current_pos)(int pos);
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/track.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- track.c     7 Nov 2003 22:33:28 -0000       1.5
+++ track.c     9 Nov 2003 14:43:03 -0000       1.6
@@ -11,15 +11,14 @@
  * @param udata Pointer to an ePlayer struct.
  */
 void track_play_chunk(void *udata) {
-#define BUF_SIZE 65536
        ePlayer *player = udata;
        PlayListItem *pli = player->playlist->cur_item->data;
        int read;
-       static unsigned char pcmout[BUF_SIZE];
+       unsigned char *buf = NULL;
 
        while (!player->playback_stop &&
-              (read = pli->plugin->read(pcmout, BUF_SIZE))) {
-               player->output->play(pcmout, read);
+              (read = pli->plugin->read(&buf))) {
+               player->output->play(buf, read);
 
                pthread_mutex_lock(&pli->pos_mutex);
                pli->current_pos = pli->plugin->get_current_pos();




-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to