]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/esd.c
* rss.c: Test fix for a bug i can't reproduce (most likely due to a missing 0 at...
[vlc] / modules / audio_output / esd.c
index 02745c77be4fcb91fcbd2d77a38ece5fe5353d48..7b96a48555b2efefa1226909c8e07a172545b734 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * esd.c : EsounD module
  *****************************************************************************
- * Copyright (C) 2000, 2001 VideoLAN (Centrale Réseaux) and its contributors
+ * Copyright (C) 2000, 2001 the VideoLAN team
  * $Id$
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
 #include <errno.h>                                                 /* ENOMEM */
-#include <fcntl.h>                                       /* open(), O_WRONLY */
 #include <string.h>                                            /* strerror() */
 #include <unistd.h>                                      /* write(), close() */
 #include <stdlib.h>                            /* calloc(), malloc(), free() */
 
 #include <vlc/vlc.h>
-#include <vlc/aout.h>
-#include "aout_internal.h"
+#include <vlc_aout.h>
 
 #include <sys/socket.h>
 
@@ -169,7 +167,7 @@ static int Open( vlc_object_t *p_this )
     {
         p_sys->latency = 0;
     }
-        
+
     /* ESD latency is calculated for 44100 Hz. We don't have any way to get the
      * number of buffered samples, so I assume ESD_BUF_SIZE/2 */
     p_sys->latency +=
@@ -199,10 +197,10 @@ static void Play( aout_instance_t *p_aout )
 
     if ( p_buffer != NULL )
     {
-        int pos;
-        char *data = p_buffer->p_buffer;
+        unsigned int pos;
+        unsigned char *data = p_buffer->p_buffer;
 
-        for( pos = 0; pos + ESD_BUF_SIZE <= p_buffer->i_nb_bytes; 
+        for( pos = 0; pos + ESD_BUF_SIZE <= p_buffer->i_nb_bytes;
              pos += ESD_BUF_SIZE )
         {
             i_tmp = write( p_sys->i_fd, data + pos, ESD_BUF_SIZE );