Little changes for new PCM API.

This commit is contained in:
Jaroslav Kysela 1998-08-28 14:08:47 +00:00
parent 55a39d6eda
commit e5535421d9
4 changed files with 19 additions and 16 deletions

View file

@ -36,7 +36,10 @@ clean:
rm -f core .depend *.o *.orig *~
rm -f `find . -name "out.txt"`
pack: clean
rm -f config.cache config.log config.status Makefile.conf
cvsclean: clean
rm -f config.cache config.log config.status Makefile.conf \
include/config.h utils/alsa-utils.spec configure
pack: cvsclean
chown -R root.root ../alsa-utils
tar cvz -C .. -f ../alsa-utils-$(SND_UTIL_VERSION).tar.gz alsa-utils

View file

@ -21,7 +21,7 @@ $(TARGET): .depend $(OBJECTS)
ln -sf $(TARGET) $(TARGET1)
clean:
rm -f core .depend *.o *.orig *~
rm -f core aplay .depend *.o *.orig *~
.depend:
$(CPP) $(COPTS) $(INCLUDE) -M *.c > .depend

View file

@ -113,7 +113,6 @@ static void check_new_format( snd_pcm_format_t *format )
fprintf( stderr, "%s: unsupported rate %iHz for playback (valid range is %iHz-%iHz)\n", command, format -> rate, pinfo.min_rate, pinfo.max_rate );
exit( 1 );
}
if ( format -> format != SND_PCM_SFMT_MU_LAW )
if ( !(pinfo.formats & (1 << format -> format)) ) {
fprintf( stderr, "%s: requested format %s isn't supported with hardware\n", command, get_format( format -> format ) );
exit( 1 );
@ -123,7 +122,6 @@ static void check_new_format( snd_pcm_format_t *format )
fprintf( stderr, "%s: unsupported rate %iHz for record (valid range is %iHz-%iHz)\n", command, format -> rate, rinfo.min_rate, rinfo.max_rate );
exit( 1 );
}
if ( format -> format != SND_PCM_SFMT_MU_LAW )
if ( !(rinfo.formats & (1 << format -> format)) ) {
fprintf( stderr, "%s: requested format %s isn't supported with hardware\n", command, get_format( rformat.format ) );
exit( 1 );
@ -209,7 +207,8 @@ static void device_list( void )
printf( " Formats:\n" );
for ( idx = 0; idx < SND_PCM_SFMT_GSM; idx++ ) {
if ( playinfo.formats & (1 << idx) )
printf( " %s\n", get_format( idx ) );
printf( " %s%s\n", get_format( idx ),
playinfo.hw_formats & (1 << idx) ? " [hardware]" : "" );
}
if ( (err = snd_ctl_pcm_record_info( handle, dev, &recinfo )) < 0 ) {
printf( "Error: control digital audio record info (%i): %s\n", card, snd_strerror( err ) );
@ -223,7 +222,8 @@ static void device_list( void )
printf( " Formats:\n" );
for ( idx = 0; idx < SND_PCM_SFMT_GSM; idx++ ) {
if ( recinfo.formats & (1 << idx) )
printf( " %s\n", get_format( idx ) );
printf( " %s%s\n", get_format( idx ),
recinfo.hw_formats & (1 << idx) ? " [hardware]" : "" );
}
}
}

View file

@ -1 +1 @@
0.0.5
0.0.6