]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Big renaming - from sound to asound...
authorJaroslav Kysela <perex@perex.cz>
Sun, 30 Aug 1998 21:08:44 +0000 (21:08 +0000)
committerJaroslav Kysela <perex@perex.cz>
Sun, 30 Aug 1998 21:08:44 +0000 (21:08 +0000)
20 files changed:
CHANGELOG
Makefile
configure.in
doc/soundapi-1.html
doc/soundapi-3.html
doc/soundapi-4.html
doc/soundapi-5.html
doc/soundapi.sgml
doc/soundapi.txt
include/header.h
src/Makefile
src/control/cards.c
src/control/control.c
src/error.c
src/mixer/mixer.c
src/pcm/pcm.c
src/rawmidi/rawmidi.c
test/control.c
test/mixer.c
test/switches.c

index 1a1ddb8ea9d67c117dd907b5480e7d174d16633f..231f3311bdb83325b388e64288f17be197b36ebd 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,7 @@
 0.0.9 -> 0.1.0
 
+* renamed soundlib.h to asoundlib.h
+* renamed libraries from libsound to libasound
 * big API changes
   - added switches interfaces
 * added RawMIDI API
index 7e467fe473a7baeefa51c6ef45fd6a26631a5f09..fa03fe6d02c6250cfe85121e87a7a6db5e8b3471 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,26 +13,26 @@ dummy:
 endif
 
 
-all: include/soundlib.h
+all: include/asoundlib.h
        $(MAKE) -C src
        $(MAKE) -C doc
        @echo
        @echo "ALSA library were sucessfully compiled."
        @echo
 
-include/soundlib.h:    include/header.h include/version.h include/error.h include/footer.h \
+include/asoundlib.h:   include/header.h include/version.h include/error.h include/footer.h \
                        include/control.h include/mixer.h include/pcm.h include/rawmidi.h
        cat include/header.h include/version.h include/error.h \
            include/control.h include/mixer.h \
            include/pcm.h include/rawmidi.h \
-           include/footer.h > include/soundlib.h
+           include/footer.h > include/asoundlib.h
 
 install: all
-       $(INSTALL) -m 644 -o root -g root include/soundlib.h ${includedir}/sys
-       $(INSTALL) -m 644 -o root -g root lib/libsound.a ${libdir}
-       $(LN_S) -f libsound.so.${SND_LIB_VERSION} ${libdir}/libsound.so
-       $(LN_S) -f libsound.so.${SND_LIB_VERSION} ${libdir}/libsound.so.${SND_LIB_MAJOR}
-       $(INSTALL) -m 644 -o root -g root lib/libsound.so.${SND_LIB_VERSION} ${libdir}
+       $(INSTALL) -m 644 -o root -g root include/asoundlib.h ${includedir}/sys
+       $(INSTALL) -m 644 -o root -g root lib/libasound.a ${libdir}
+       $(LN_S) -f libasound.so.${SND_LIB_VERSION} ${libdir}/libasound.so
+       $(LN_S) -f libasound.so.${SND_LIB_VERSION} ${libdir}/libasound.so.${SND_LIB_MAJOR}
+       $(INSTALL) -m 644 -o root -g root lib/libasound.so.${SND_LIB_VERSION} ${libdir}
        /sbin/ldconfig
 
 clean:
@@ -46,7 +46,7 @@ clean:
 
 cvsclean: clean
        rm -f configure config.cache config.log config.status Makefile.conf \
-              utils/alsa-lib.spec include/config.h include/soundlib.h include/version.h
+              utils/alsa-lib.spec include/config.h include/asoundlib.h include/version.h
 
 pack: cvsclean
        chown -R root.root ../alsa-lib
index 5fb3db4ed1da9295a031b1509a15b43ca06aa691..3ea6e2fa54078eaa2c0fc0195b7fd6f6e022bd9f 100644 (file)
@@ -12,7 +12,7 @@ AC_PROG_LN_S
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_CONFIG_HEADER(include/config.h)
-AC_CHECK_HEADERS(linux/sound.h)
+AC_CHECK_HEADERS(linux/asound.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -32,7 +32,7 @@ CFLAGS="-I$myprefix/include"
 #echo "CFLAGS=$CFLAGS"
 AC_MSG_CHECKING(for alsa-driver package)
 AC_TRY_RUN([
-#include <linux/sound.h>
+#include <linux/asound.h>
 void main(void)
 {
 #if !defined( SND_PROTOCOL_VERSION ) || !defined( SND_PROTOCOL_UNCOMPATIBLE )
index f58691a26c481f92c047d5f769423d9020b8873b..71da2b899d8bbd4f53a5d4696a018a907b8ce531 100644 (file)
@@ -20,9 +20,9 @@ may be placed in the library code instead of the kernel driver.</P>
 <P>For a complete list of all variables and functions in the API you should look
 at the following header files:
 <OL>
-<LI>/usr/include/sys/soundlib.h</LI>
-<LI>/usr/include/linux/sound.h</LI>
-<LI>/usr/include/linux/sounddetect.h</LI>
+<LI>/usr/include/sys/asoundlib.h</LI>
+<LI>/usr/include/linux/asound.h</LI>
+<LI>/usr/include/linux/asoundid.h</LI>
 </OL>
 </P>
 
index 47daa30df7fd57565cd4c22083457c013d818412..0f218b0ed44876fa3e9ecae7dcd92abb852cf436 100644 (file)
@@ -134,11 +134,11 @@ int card = 0, err;
 void *handle;
 stuct snd_ctl_hw_info info;
 
-if ( (err = snd_ctl_open( &amp;handle, card )) &lt; 0 ) {
+if ( (err = snd_ctl_open( &handle, card )) &lt; 0 ) {
   fprintf( stderr, &quot;open failed: %s\n&quot;, snd_strerror( err ) );
   return;
 }
-if ( (err = snd_ctl_hw_info( handle, &amp;info )) &lt; 0 ) {
+if ( (err = snd_ctl_hw_info( handle, &info )) &lt; 0 ) {
   fprintf( stderr, &quot;hw info failed: %s\n&quot;, snd_strerror( err ) );
   snd_ctl_close( handle );
   return;
index 719315e7e4a0d7a88c63b59b1c0525267b3f23a2..b458b8f3b143e41a39c6620323a3b0656e341471 100644 (file)
@@ -228,11 +228,11 @@ void *handle;
 snd_mixer_info_t info;
 snd_mixer_channel_t channel;
 
-if ( (err = snd_mixer_open( &amp;handle, card, device )) &lt; 0 ) {
+if ( (err = snd_mixer_open( &handle, card, device )) &lt; 0 ) {
   fprintf( stderr, &quot;open failed: %s\n&quot;, snd_strerror( err ) );
   return;
 }
-if ( (err = snd_mixer_info( handle, &amp;info )) &lt; 0 ) {
+if ( (err = snd_mixer_info( handle, &info )) &lt; 0 ) {
   fprintf( stderr, &quot;info failed: %s\n&quot;, snd_strerror( err ) );
   snd_mixer_close( handle );
   return;
@@ -241,13 +241,13 @@ printf( &quot;Installed MIXER channels for card #i and device %i: %i\n&quot;,
                                         card + 1, device, info.channels );
 master = snd_mixer_channel( handle, SND_MIXER_ID_MASTER );
 if ( master &gt;= 0 ) {
-  if ( (err = snd_mixer_read( handle, master, &amp;channel )) &lt; 0 ) {
+  if ( (err = snd_mixer_read( handle, master, &channel )) &lt; 0 ) {
     fprintf( stderr, &quot;master read failed: %s\n&quot;, snd_strerror( err ) );
     snd_mixer_close( handle );
     return;
   }
   channel -&gt; left = channel -&gt; right = 50;
-  if ( (err = snd_mixer_write( handle, master, &amp;channel )) &lt; 0 ) {
+  if ( (err = snd_mixer_write( handle, master, &channel )) &lt; 0 ) {
     fprintf( stderr, &quot;master write failed: %s\n&quot;, snd_strerror( err ) );
     snd_mixer_close( handle );
     return;
index 4cfb17d378e8d7a9439e2a55c13bd0eea1795103..83ce1352eda9522fa0c843319cc20fc975bcbe2c 100644 (file)
@@ -394,7 +394,7 @@ should not be equal to <I>count</I>.</P>
 of <I>snd_pcm_playback_status</I>.</P>
 <DT><B>time</B><DD><P>Delay till played of the first sample from next write. This value should
 be used for time synchronization. Returned value is in the same format as 
-returned from the standard C function <I>gettimeofday( &amp;time, NULL )</I>.
+returned from the standard C function <I>gettimeofday( &time, NULL )</I>.
 This variable contains right value only if playback time mode is enabled
 (look to <I>snd_pcm_playback_time</I> function).</P>
 <DT><B>stime</B><DD><P>Time when playback was started.
@@ -434,7 +434,7 @@ should not be equal to <I>count</I>.</P>
 to <I>snd_pcm_record_status</I>.</P>
 <DT><B>time</B><DD><P>Lag since the next sample read was recorded. This value should be used for time
 synchronization. Returned value is in the same format as returned by the
-from standard C function <I>gettimeofday( &amp;time, NULL )</I>. This
+from standard C function <I>gettimeofday( &time, NULL )</I>. This
 variable contains right value only if record time mode is enabled (look to
 <I>snd_pcm_record_time</I> function).</P>
 <DT><B>stime</B><DD><P>Time when record was started. This variable contains right value only if
@@ -503,19 +503,19 @@ char *buffer;
 
 buffer = (char *)malloc( 512 * 1024 );
 if ( !buffer ) return;
-if ( (err = snd_pcm_open( &amp;handle, card, device, SND_PCM_OPEN_PLAYBACK )) &lt; 0 ) {
+if ( (err = snd_pcm_open( &handle, card, device, SND_PCM_OPEN_PLAYBACK )) &lt; 0 ) {
   fprintf( stderr, &quot;open failed: %s\n&quot;, snd_strerror( err ) );
   return;
 }
 format.format = SND_PCM_SFMT_MU_LAW;
 format.rate = 8000;
-format.voices = 1;
-if ( (err = snd_pcm_playback_format( handle, &amp;format )) &lt; 0 ) {
+format.channels = 1;
+if ( (err = snd_pcm_playback_format( handle, &format )) &lt; 0 ) {
   fprintf( stderr, &quot;format setup failed: %s\n&quot;, snd_strerror( err ) );
   snd_pcm_close( handle );
   return;
 }
-fd = open( &quot;/tmp/test.au&quot; );
+fd = open( &quot;/tmp/test.au&quot;, O_RDONLY );
 if ( fd &lt; 0 ) {
   perror( &quot;open file&quot; );
   snd_pcm_close( handle );
@@ -534,7 +534,7 @@ if ( !memcmp( buffer, &quot;.snd&quot;, 4 ) ) {
   if ( idx &gt; 128 ) idx = 128;
   if ( idx &gt; count ) idx = count;
 }
-size = snd_pcm_write( handle, &amp;buffer[ idx ], count - idx );
+size = snd_pcm_write( handle, &buffer[ idx ], count - idx );
 printf( &quot;Bytes written %i from %i...\n&quot;, size, count - idx );
 snd_pcm_close( handle );
 free( buffer );
index bf32ebc3788c05c00872d494acd2187bac3dd2cf..3d0e482d742937b645738b029d474190f7926ebe 100644 (file)
@@ -35,9 +35,9 @@ may be placed in the library code instead of the kernel driver.
 For a complete list of all variables and functions in the API you should look
 at the following header files:
 <enum>
-  <item>/usr/include/sys/soundlib.h
-  <item>/usr/include/linux/sound.h
-  <item>/usr/include/linux/sounddetect.h
+  <item>/usr/include/sys/asoundlib.h
+  <item>/usr/include/linux/asound.h
+  <item>/usr/include/linux/asoundid.h
 </enum>
 
 <sect>Error Codes
@@ -922,13 +922,13 @@ if ( (err = snd_pcm_open( &ero;handle, card, device, SND_PCM_OPEN_PLAYBACK )) <
 }
 format.format = SND_PCM_SFMT_MU_LAW;
 format.rate = 8000;
-format.voices = 1;
+format.channels = 1;
 if ( (err = snd_pcm_playback_format( handle, &ero;format )) < 0 ) {
   fprintf( stderr, "format setup failed: %s\n", snd_strerror( err ) );
   snd_pcm_close( handle );
   return;
 }
-fd = open( "/tmp/test.au" );
+fd = open( "/tmp/test.au", O_RDONLY );
 if ( fd < 0 ) {
   perror( "open file" );
   snd_pcm_close( handle );
index ebe5d45f76cb3b9b9c8451524ec771d8a689e65d..037de8138a92083eec05cc18fcefcb86aaeb50f4 100644 (file)
   For a complete list of all variables and functions in the API you
   should look at the following header files:
 
-  1. /usr/include/sys/soundlib.h
+  1. /usr/include/sys/asoundlib.h
 
-  2. /usr/include/linux/sound.h
+  2. /usr/include/linux/asound.h
 
-  3. /usr/include/linux/sounddetect.h
+  3. /usr/include/linux/asoundid.h
 
   2\b2.\b.  E\bEr\brr\bro\bor\br C\bCo\bod\bde\bes\bs
 
        }
        format.format = SND_PCM_SFMT_MU_LAW;
        format.rate = 8000;
-       format.voices = 1;
+       format.channels = 1;
        if ( (err = snd_pcm_playback_format( handle, &format )) < 0 ) {
          fprintf( stderr, "format setup failed: %s\n", snd_strerror( err ) );
          snd_pcm_close( handle );
          return;
        }
-       fd = open( "/tmp/test.au" );
+       fd = open( "/tmp/test.au", O_RDONLY );
        if ( fd < 0 ) {
          perror( "open file" );
          snd_pcm_close( handle );
index 3bf1812433a5b0ba0d5848dd403c6337d4eb78b9..7261c01156fceece88097c7ca94a11869d1654f3 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef __SOUNDLIB_H
 #define __SOUNDLIB_H
 
-#include <linux/sound.h>
+#include <linux/asound.h>
 #include <unistd.h>
 #include <fcntl.h>
 
index 166426ca6c3a91c2b379e4b8f03f59d68a80dfda..42740fe15652a998601a95811d5431fede0b6bbd 100644 (file)
@@ -5,10 +5,10 @@
 
 include ../Makefile.conf
 
-TARGET=../lib/libsound.a
-STARGET=../lib/libsound.so
-STARGETX=../lib/libsound.so.$(SND_LIB_VERSION)
-STARGETO=../lib/libsound.so.$(SND_LIB_MAJOR)
+TARGET=../lib/libasound.a
+STARGET=../lib/libasound.so
+STARGETX=../lib/libasound.so.$(SND_LIB_VERSION)
+STARGETO=../lib/libasound.so.$(SND_LIB_MAJOR)
 TARGETS=$(TARGET) $(STARGET)
 
 STATIC_LIBS=   control/libcontrol.a \
@@ -34,14 +34,14 @@ SOBJECTS=error.So
 all: $(TARGETS)
 
 $(TARGET): .depend $(OBJECTS) $(STATIC_LIBS)
-       rm -f ../lib/libsound.a
+       rm -f ../lib/libasound.a
        $(LINKER) -r -o $(TARGET) $(STATIC_LIBS) $(OBJECTS)
 
 $(STARGET): .depend $(SOBJECTS) $(DYNAMIC_LIBS)
-       rm -f ../lib/libsound*.so*
-       $(CC) -shared -Wl,-soname,libsound.so.$(SND_LIB_MAJOR) $(DYNAMIC_LIBS) $(SOBJECTS) -o $(STARGETX)
-       ln -s libsound.so.$(SND_LIB_VERSION) $(STARGET)
-       ln -s libsound.so.$(SND_LIB_VERSION) $(STARGETO)
+       rm -f ../lib/libasound*.so*
+       $(CC) -shared -Wl,-soname,libasound.so.$(SND_LIB_MAJOR) $(DYNAMIC_LIBS) $(SOBJECTS) -o $(STARGETX)
+       ln -s libasound.so.$(SND_LIB_VERSION) $(STARGET)
+       ln -s libasound.so.$(SND_LIB_VERSION) $(STARGETO)
 
 control/libcontrol.a:
        $(MAKE) -C control
@@ -69,7 +69,7 @@ clean:
        $(MAKE) -C mixer clean
        $(MAKE) -C rawmidi clean
        rm -f core .depend *.o *.So *.orig *~
-       rm -f ../lib/libsound.*
+       rm -f ../lib/libasound.*
 
 .depend:
        $(CPP) $(COPTS) $(INCLUDE) -M *.c > .depend
index 413cb74379f386bab1a811325abea0b419973ecd..c7a8da27c5117ca31693082395d73041c8f179b4 100644 (file)
@@ -26,7 +26,7 @@
 #include <ctype.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
-#include "soundlib.h"
+#include "asoundlib.h"
 
 #define SND_FILE_CONTROL       "/dev/sndcontrol%i"
 
index 2e98b3df0c4989561b4131313b0a2ac30765815e..b5912324041bab508cc8d0c89729e3ff71aa5280 100644 (file)
@@ -26,7 +26,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
-#include "soundlib.h"
+#include "asoundlib.h"
 
 #define SND_FILE_CONTROL       "/dev/snd/control%i"
 #define SND_CTL_VERSION_MAX    SND_PROTOCOL_VERSION( 1, 0, 0 )
index 217a86d5ae2688bd67320213447cd57995bb49e5..387d6da7ef84d688185c6b205a843ba0b23f61be 100644 (file)
@@ -24,7 +24,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "soundlib.h"
+#include "asoundlib.h"
 
 static const char *snd_error_codes[] = {
   "Sound protocol isn't compatible"
index 430a133c044a4debb55725fdcd481574fc12b633..f385bc99c629c8e3842b5aba200bbd5ce54cb728 100644 (file)
@@ -26,7 +26,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
-#include "soundlib.h"
+#include "asoundlib.h"
 
 #define SND_FILE_MIXER         "/dev/snd/mixer%i%i"
 #define SND_MIXER_VERSION_MAX  SND_PROTOCOL_VERSION( 1, 0, 1 )
index 15c5d9ed8091657965fe183d7143bda664347820..5557f13bb340c17019d5a194c8b991aed1824bb0 100644 (file)
@@ -26,7 +26,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
-#include "soundlib.h"
+#include "asoundlib.h"
 
 #define SND_FILE_PCM           "/dev/snd/pcm%i%i"
 #define SND_PCM_VERSION_MAX    SND_PROTOCOL_VERSION( 1, 0, 0 )
index 016541e618fb281605d568a91b0425ceea337376..6a3b46ec55faf8b41ec6fcbe60826d067197469c 100644 (file)
@@ -26,7 +26,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
-#include "soundlib.h"
+#include "asoundlib.h"
 
 #define SND_FILE_RAWMIDI       "/dev/snd/midi%i%i"
 #define SND_PCM_VERSION_MAX    SND_PROTOCOL_VERSION( 1, 0, 0 )
index fa6e7502ba37c7ce93adb3338c2f896a0f436655..e7f931193cd7166637a7231fb38f9509666a9349 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include <string.h>
-#include "../include/soundlib.h"
+#include "../include/asoundlib.h"
 
 void main( void )
 {
index 6ef0f30ba0251fafb8574d5e220ec770265045a1..1ab3e80325357b932bab7cdf24937e732f2371e7 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include <string.h>
-#include "../include/soundlib.h"
+#include "../include/asoundlib.h"
 
 static void mixer_test( int card, int device )
 {
index f8992c28f3bb17992cc78efd2e580444a1628aee..334e2baad7e6d39a07b171dade6e9e1dcf7ff331 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include <string.h>
-#include "../include/soundlib.h"
+#include "../include/asoundlib.h"
 
 const char *get_type( unsigned int type )
 {