Commit aae759a3 authored by Arnaud Blanchard's avatar Arnaud Blanchard

Manage more options

parent e2f43631
......@@ -22,6 +22,7 @@ blaar_add_option size s "" "integer" "number of items per buffer" "4096"
blaar_add_option samplerate S "" "integer" "Samplerate of the sound acquisition" "44100"
blaar_parse_args "$@"
[ $filename ] && file_option="--file=$filename" || file_option=""
[ $output ] && output_option="--output=$output"|| output_option=""
if [ $filename ]; then
......
......@@ -32,12 +32,12 @@ if [ $filename ]; then
echo "to '$filename'" >&2
[ $device ] && { echo "You cannot have file (-f $filename) and speaker (-D $device) at the same time"; exit 1; }
o_sndfile --file=$filename --size=$size --samplerate=$samplerate $sound
elif [ $(uname) = "Darwin" ]; then #microphone
elif [ $(uname) = "Darwin" ]; then
echo "to coreaudio speaker" >&2
o_coreaudio $sound
o_coreaudio --samplerate=$samplerate $sound
elif [ $(uname) = "Linux" ]; then
echo "to ALSA speaker" >&2
o_asound $sound
o_asound --samplerate=$samplerate $sound
else
echo "$blaar_program_name does not work on '$(uname)' platform"
exit 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment