[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdemultimedia/kscd/libwm/audio
From:       Alex Kern <alex.kern () gmx ! de>
Date:       2004-07-03 19:20:19
Message-ID: 20040703192019.0004F99BE () office ! kde ! org
[Download RAW message or body]

CVS commit by kernalex: 

Update of CDDA, now it works without glitches


  M +1 -1      audio.h   1.4
  M +5 -5      audio_alsa.c   1.10
  M +3 -3      audio_arts.c   1.8


--- kdemultimedia/kscd/libwm/audio/audio.h  #1.3:1.4
@@ -11,5 +11,5 @@ struct audio_oops {
   int (*wmaudio_open)(void);
   int (*wmaudio_close)(void);
-  int (*wmaudio_play)(char*, long, struct cdda_block*);
+  int (*wmaudio_play)(struct cdda_block*);
   int (*wmaudio_stop)(void);
   int (*wmaudio_state)(struct cdda_block*);

--- kdemultimedia/kscd/libwm/audio/audio_alsa.c  #1.9:1.10
@@ -39,5 +39,5 @@ int alsa_open(void);
 int alsa_close(void);
 int alsa_stop(void);
-int alsa_play(char *rawbuf, long buflen, struct cdda_block *blk);
+int alsa_play(struct cdda_block *blk);
 int alsa_state(struct cdda_block *blk);
 struct audio_oops* setup_alsa(const char *dev, const char *ctl);
@@ -228,12 +228,12 @@ int alsa_close( void )
  */
 int
-alsa_play(char *rawbuf, long buflen, struct cdda_block *blk)
+alsa_play(struct cdda_block *blk)
 {
   signed short *ptr;
   int err = 0, frames;
 
-  ptr = (signed short *)rawbuf;
-  frames = buflen / (channels * 2);
-  DEBUGLOG("play %i frames, %i bytes\n", frames, buflen);
+  ptr = (signed short *)blk->buf;
+  frames = blk->buflen / (channels * 2);
+  DEBUGLOG("play %i frames, %i bytes\n", frames, blk->buflen);
   while (frames > 0) {
     err = snd_pcm_writei(handle, ptr, frames);

--- kdemultimedia/kscd/libwm/audio/audio_arts.c  #1.7:1.8
@@ -36,5 +36,5 @@ int arts_open(void);
 int arts_close(void);
 int arts_stop(void);
-int arts_play(char *rawbuf, long buflen, struct cdda_block *blk);
+int arts_play(struct cdda_block *blk);
 int arts_state(struct cdda_block *blk);
 struct audio_oops* setup_arts(const char *dev, const char *ctl);
@@ -83,9 +83,9 @@ arts_close(void)
  */
 int
-arts_play(char *rawbuf, long buflen, struct cdda_block *blk)
+arts_play(struct cdda_block *blk)
 {
   int err;
 
-  if((err = arts_write(arts_stream, rawbuf, buflen)) < 0) {
+  if((err = arts_write(arts_stream, blk->buf, blk->buflen)) < 0) {
     ERRORLOG("arts_write failed (%s)\n", arts_error_text(err));
     blk->status = WM_CDM_CDDAERROR;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic