mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:45:41 +01:00
Little changes for new PCM API.
This commit is contained in:
parent
55a39d6eda
commit
e5535421d9
4 changed files with 19 additions and 16 deletions
7
Makefile
7
Makefile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -113,21 +113,19 @@ 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 );
|
||||
}
|
||||
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 );
|
||||
}
|
||||
} else {
|
||||
if ( rinfo.min_rate > format -> rate || rinfo.max_rate < format -> rate ) {
|
||||
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 );
|
||||
}
|
||||
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]" : "" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
2
version
2
version
|
@ -1 +1 @@
|
|||
0.0.5
|
||||
0.0.6
|
||||
|
|
Loading…
Reference in a new issue