Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed 'default:0' to 'default'

  • Loading branch information...
commit ae3d94ac02a824edb18b1984b1f53c836991a738 1 parent 695ecb8
@wedesoft authored
View
6 lib/hornetseye-alsa/alsainput.rb
@@ -40,7 +40,7 @@ class << self
# @example Open standard microphone device
# require 'hornetseye_alsa'
# include Hornetseye
- # microphone = AlsaInput.new 'default:0', 44_100, 2
+ # microphone = AlsaInput.new 'default', 44_100, 2
#
# @param [String] pcm_name Name of the PCM device
# @param [Integer] rate Desired sampling rate.
@@ -50,7 +50,7 @@ class << self
# @return [AlsaInput] An object for accessing the microphone.
#
# @see #rate
- def new( pcm_name = 'default:0', rate = 48000, channels = 2, periods = 8,
+ def new( pcm_name = 'default', rate = 48000, channels = 2, periods = 8,
frames = 1024 )
orig_new pcm_name, rate, channels, periods, frames
end
@@ -74,7 +74,7 @@ def new( pcm_name = 'default:0', rate = 48000, channels = 2, periods = 8,
# @example Read 3 seconds of audio samples
# require 'hornetseye_alsa'
# include Hornetseye
- # microphone = AlsaInput.new 'default:0', 44_100, 2
+ # microphone = AlsaInput.new 'default', 44_100, 2
# data = microphone.read 3 * 44_100
#
# @param [Integer] samples Number of samples to read.
View
6 lib/hornetseye-alsa/alsaoutput.rb
@@ -40,7 +40,7 @@ class << self
# @example Open default speakers
# require 'hornetseye_alsa'
# include Hornetseye
- # speaker = AlsaOutput.new 'default:0', 44_100, 2
+ # speaker = AlsaOutput.new 'default', 44_100, 2
#
# @param [String] pcm_name Name of the PCM device
# @param [Integer] rate Desired sampling rate.
@@ -50,7 +50,7 @@ class << self
# @return [AlsaOutput] An object for accessing the speakers.
#
# @see #rate
- def new( pcm_name = 'default:0', rate = 48000, channels = 2, periods = 8,
+ def new( pcm_name = 'default', rate = 48000, channels = 2, periods = 8,
frames = 1024 )
orig_new pcm_name, rate, channels, periods, frames
end
@@ -75,7 +75,7 @@ def new( pcm_name = 'default:0', rate = 48000, channels = 2, periods = 8,
# @example Play a 400Hz tune for 3 seconds
# require 'hornetseye_alsa'
# include Hornetseye
- # speaker = AlsaOutput.new 'default:0', 44_100, 2
+ # speaker = AlsaOutput.new 'default', 44_100, 2
# L = 44_100 / 400
# wave = lazy( 2, L ) { |j,i| Math.sin( i * 2 * Math::PI / L ) * 0x7FFF }.to_sint
# ( 3 * 400 ).times { speaker.write wave }
Please sign in to comment.
Something went wrong with that request. Please try again.