ruby-alsa 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,13 +10,11 @@ module ALSA::PCM
10
10
 
11
11
  ALSA.logger.debug { "start read with #{hw_params.sample_rate}, #{hw_params.channels} channels"}
12
12
 
13
- # use an 500ms buffer
14
- frame_count = hw_params.sample_rate / 2
15
- ALSA.logger.debug { "allocate #{hw_params.buffer_size_for(frame_count)} bytes for #{frame_count} frames" }
16
- FFI::MemoryPointer.new(:char, hw_params.buffer_size_for(frame_count)) do |buffer|
13
+ ALSA.logger.debug { "allocate #{hw_params.buffer_size_for(buffer_frame_count)} bytes for #{buffer_frame_count} frames" }
14
+ FFI::MemoryPointer.new(:char, hw_params.buffer_size_for(buffer_frame_count)) do |buffer|
17
15
  begin
18
- read_buffer buffer, frame_count
19
- end while yield buffer, frame_count
16
+ read_buffer buffer, buffer_frame_count
17
+ end while yield buffer, buffer_frame_count
20
18
  end
21
19
  end
22
20
 
@@ -27,14 +27,13 @@ module ALSA::PCM
27
27
  def write
28
28
  check_handle!
29
29
 
30
- frame_count = hw_params.sample_rate / 2
31
- FFI::MemoryPointer.new(:char, hw_params.buffer_size_for(frame_count)) do |buffer|
30
+ FFI::MemoryPointer.new(:char, hw_params.buffer_size_for(buffer_frame_count)) do |buffer|
32
31
  while audio_content = yield(buffer.size)
33
32
  buffer.write_string audio_content
34
33
 
35
34
  read_frame_count =
36
35
  if audio_content.size == buffer.size
37
- frame_count
36
+ buffer_frame_count
38
37
  else
39
38
  hw_params.frame_count_for(audio_content.size)
40
39
  end
@@ -2,12 +2,22 @@ module ALSA::PCM
2
2
  class Stream
3
3
 
4
4
  attr_accessor :handle
5
+ attr_accessor :buffer_time_size
5
6
 
6
7
  def self.open(device = "default", hardware_attributes = {}, &block)
7
8
  new.open(device, hardware_attributes, &block)
8
9
  end
9
10
 
10
11
  def open(device = "default", hardware_attributes = {}, &block)
12
+ options = {}
13
+
14
+ if Hash === device
15
+ options = device
16
+ device = (options[:device] or "default")
17
+ end
18
+
19
+ self.buffer_time_size = options[:buffer_time_size] if options[:buffer_time_size]
20
+
11
21
  handle_pointer = FFI::MemoryPointer.new :pointer
12
22
  ALSA::try_to "open audio device #{device}" do
13
23
  ALSA::PCM::Native::open handle_pointer, device, native_constant, ALSA::PCM::Native::BLOCK
@@ -25,6 +35,14 @@ module ALSA::PCM
25
35
  end
26
36
  end
27
37
 
38
+ def buffer_time_size
39
+ @buffer_time_size ||= 250
40
+ end
41
+
42
+ def buffer_frame_count
43
+ @buffer_frame_count ||= hw_params.sample_rate * buffer_time_size / 1000
44
+ end
45
+
28
46
  def change_hardware_parameters
29
47
  hw_params = ALSA::PCM::HwParameters.new(self).default_for_device
30
48
 
data/lib/alsa.rb CHANGED
@@ -5,7 +5,7 @@ require 'ffi'
5
5
 
6
6
  module ALSA
7
7
 
8
- VERSION = "0.0.4"
8
+ VERSION = "0.0.5"
9
9
 
10
10
  end
11
11
 
data/log/test.log CHANGED
@@ -2946,3 +2946,337 @@ D, [2010-04-25T16:52:02.415292 #23459] DEBUG -- : write in audio interface
2946
2946
  D, [2010-04-25T16:52:02.415369 #23459] DEBUG -- : close audio device
2947
2947
  D, [2010-04-25T17:17:21.113643 #27858] DEBUG -- : dummy
2948
2948
  D, [2010-04-25T17:17:21.117075 #27858] DEBUG -- : dummy
2949
+ D, [2010-06-06T17:41:44.832315 #16658] DEBUG -- : open audio device default
2950
+ D, [2010-06-06T17:41:44.840418 #16658] DEBUG -- : initialize hardware parameter structure
2951
+ D, [2010-06-06T17:41:44.840633 #16658] DEBUG -- : set sample rate
2952
+ D, [2010-06-06T17:41:44.840861 #16658] DEBUG -- : set access type
2953
+ D, [2010-06-06T17:41:44.840980 #16658] DEBUG -- : set channel count : 2
2954
+ D, [2010-06-06T17:41:44.841117 #16658] DEBUG -- : set sample format
2955
+ D, [2010-06-06T17:41:44.841216 #16658] DEBUG -- : set hw parameters
2956
+ D, [2010-06-06T17:41:44.841456 #16658] DEBUG -- : unallocate hw_params
2957
+ D, [2010-06-06T17:41:44.841858 #16658] DEBUG -- : close audio device
2958
+ D, [2010-06-06T17:41:44.862440 #16658] DEBUG -- : open audio device default
2959
+ D, [2010-06-06T17:41:44.869383 #16658] DEBUG -- : initialize hardware parameter structure
2960
+ D, [2010-06-06T17:41:44.869591 #16658] DEBUG -- : set sample rate
2961
+ D, [2010-06-06T17:41:44.869806 #16658] DEBUG -- : set access type
2962
+ D, [2010-06-06T17:41:44.869937 #16658] DEBUG -- : set channel count : 2
2963
+ D, [2010-06-06T17:41:44.870070 #16658] DEBUG -- : set sample format
2964
+ D, [2010-06-06T17:41:44.870165 #16658] DEBUG -- : set hw parameters
2965
+ D, [2010-06-06T17:41:44.870391 #16658] DEBUG -- : unallocate hw_params
2966
+ D, [2010-06-06T17:41:44.870494 #16658] DEBUG -- : close audio device
2967
+ D, [2010-06-06T17:41:44.870932 #16658] DEBUG -- : open audio device default
2968
+ D, [2010-06-06T17:41:44.881079 #16658] DEBUG -- : initialize hardware parameter structure
2969
+ D, [2010-06-06T17:41:44.881452 #16658] DEBUG -- : set sample rate
2970
+ D, [2010-06-06T17:41:44.881890 #16658] DEBUG -- : set access type
2971
+ D, [2010-06-06T17:41:44.882171 #16658] DEBUG -- : set channel count : 2
2972
+ D, [2010-06-06T17:41:44.882819 #16658] DEBUG -- : set sample format
2973
+ D, [2010-06-06T17:41:44.882997 #16658] DEBUG -- : set hw parameters
2974
+ D, [2010-06-06T17:41:44.883396 #16658] DEBUG -- : unallocate hw_params
2975
+ D, [2010-06-06T17:41:44.883503 #16658] DEBUG -- : close audio device
2976
+ D, [2010-06-06T17:41:44.884678 #16658] DEBUG -- : open audio device default
2977
+ D, [2010-06-06T17:41:44.892620 #16658] DEBUG -- : initialize hardware parameter structure
2978
+ D, [2010-06-06T17:41:44.892933 #16658] DEBUG -- : set sample rate
2979
+ D, [2010-06-06T17:41:44.893268 #16658] DEBUG -- : set access type
2980
+ D, [2010-06-06T17:41:44.893448 #16658] DEBUG -- : set channel count : 2
2981
+ D, [2010-06-06T17:41:44.893658 #16658] DEBUG -- : set sample format
2982
+ D, [2010-06-06T17:41:44.893811 #16658] DEBUG -- : set hw parameters
2983
+ D, [2010-06-06T17:41:44.894474 #16658] DEBUG -- : unallocate hw_params
2984
+ D, [2010-06-06T17:41:44.894631 #16658] DEBUG -- : retrieve current hardware parameters
2985
+ D, [2010-06-06T17:41:44.894741 #16658] DEBUG -- : get sample rate
2986
+ D, [2010-06-06T17:41:44.894870 #16658] DEBUG -- : retrieve current hardware parameters
2987
+ D, [2010-06-06T17:41:44.894989 #16658] DEBUG -- : get channels
2988
+ D, [2010-06-06T17:41:44.895057 #16658] DEBUG -- : start read with 44100, 2 channels
2989
+ D, [2010-06-06T17:41:44.895183 #16658] DEBUG -- : retrieve current hardware parameters
2990
+ D, [2010-06-06T17:41:44.895291 #16658] DEBUG -- : retrieve current hardware parameters
2991
+ D, [2010-06-06T17:41:44.895387 #16658] DEBUG -- : get sample rate
2992
+ D, [2010-06-06T17:41:44.895547 #16658] DEBUG -- : close audio device
2993
+ D, [2010-06-06T17:41:44.896743 #16658] DEBUG -- : open audio device default
2994
+ D, [2010-06-06T17:41:44.904817 #16658] DEBUG -- : initialize hardware parameter structure
2995
+ D, [2010-06-06T17:41:44.905118 #16658] DEBUG -- : set sample rate
2996
+ D, [2010-06-06T17:41:44.905442 #16658] DEBUG -- : set access type
2997
+ D, [2010-06-06T17:41:44.905608 #16658] DEBUG -- : set channel count : 2
2998
+ D, [2010-06-06T17:41:44.906138 #16658] DEBUG -- : set sample format
2999
+ D, [2010-06-06T17:41:44.906344 #16658] DEBUG -- : set hw parameters
3000
+ D, [2010-06-06T17:41:44.906658 #16658] DEBUG -- : unallocate hw_params
3001
+ D, [2010-06-06T17:41:44.906794 #16658] DEBUG -- : retrieve current hardware parameters
3002
+ D, [2010-06-06T17:41:44.906891 #16658] DEBUG -- : get sample rate
3003
+ D, [2010-06-06T17:41:44.907276 #16658] DEBUG -- : retrieve current hardware parameters
3004
+ D, [2010-06-06T17:41:44.907392 #16658] DEBUG -- : get channels
3005
+ D, [2010-06-06T17:41:44.907464 #16658] DEBUG -- : start read with 44100, 2 channels
3006
+ D, [2010-06-06T17:41:44.907578 #16658] DEBUG -- : retrieve current hardware parameters
3007
+ D, [2010-06-06T17:41:44.907684 #16658] DEBUG -- : retrieve current hardware parameters
3008
+ D, [2010-06-06T17:41:44.907785 #16658] DEBUG -- : get sample rate
3009
+ D, [2010-06-06T17:41:44.908187 #16658] DEBUG -- : close audio device
3010
+ D, [2010-06-06T17:41:44.910393 #16658] DEBUG -- : open audio device default
3011
+ D, [2010-06-06T17:41:44.911735 #16658] DEBUG -- : initialize hardware parameter structure
3012
+ D, [2010-06-06T17:41:44.912221 #16658] DEBUG -- : set sample rate
3013
+ D, [2010-06-06T17:41:44.912517 #16658] DEBUG -- : set access type
3014
+ D, [2010-06-06T17:41:44.912672 #16658] DEBUG -- : set channel count : 2
3015
+ D, [2010-06-06T17:41:44.912853 #16658] DEBUG -- : set sample format
3016
+ D, [2010-06-06T17:41:44.912974 #16658] DEBUG -- : set hw parameters
3017
+ D, [2010-06-06T17:41:44.913203 #16658] DEBUG -- : unallocate hw_params
3018
+ D, [2010-06-06T17:41:44.913298 #16658] DEBUG -- : write in audio interface
3019
+ D, [2010-06-06T17:41:44.913418 #16658] DEBUG -- : close audio device
3020
+ D, [2010-06-06T17:41:44.918196 #16658] DEBUG -- : dummy
3021
+ D, [2010-06-06T17:41:44.919129 #16658] DEBUG -- : dummy
3022
+ D, [2010-06-06T17:43:16.104799 #16739] DEBUG -- : open audio device default
3023
+ D, [2010-06-06T17:43:16.116402 #16739] DEBUG -- : initialize hardware parameter structure
3024
+ D, [2010-06-06T17:43:16.116683 #16739] DEBUG -- : set sample rate
3025
+ D, [2010-06-06T17:43:16.116915 #16739] DEBUG -- : set access type
3026
+ D, [2010-06-06T17:43:16.117035 #16739] DEBUG -- : set channel count : 2
3027
+ D, [2010-06-06T17:43:16.117173 #16739] DEBUG -- : set sample format
3028
+ D, [2010-06-06T17:43:16.117273 #16739] DEBUG -- : set hw parameters
3029
+ D, [2010-06-06T17:43:16.117504 #16739] DEBUG -- : unallocate hw_params
3030
+ D, [2010-06-06T17:43:16.117931 #16739] DEBUG -- : close audio device
3031
+ D, [2010-06-06T17:43:16.138844 #16739] DEBUG -- : open audio device default
3032
+ D, [2010-06-06T17:43:16.145583 #16739] DEBUG -- : initialize hardware parameter structure
3033
+ D, [2010-06-06T17:43:16.145799 #16739] DEBUG -- : set sample rate
3034
+ D, [2010-06-06T17:43:16.146011 #16739] DEBUG -- : set access type
3035
+ D, [2010-06-06T17:43:16.146143 #16739] DEBUG -- : set channel count : 2
3036
+ D, [2010-06-06T17:43:16.146275 #16739] DEBUG -- : set sample format
3037
+ D, [2010-06-06T17:43:16.146373 #16739] DEBUG -- : set hw parameters
3038
+ D, [2010-06-06T17:43:16.146601 #16739] DEBUG -- : unallocate hw_params
3039
+ D, [2010-06-06T17:43:16.146704 #16739] DEBUG -- : close audio device
3040
+ D, [2010-06-06T17:43:16.147135 #16739] DEBUG -- : open audio device default
3041
+ D, [2010-06-06T17:43:16.152302 #16739] DEBUG -- : initialize hardware parameter structure
3042
+ D, [2010-06-06T17:43:16.152495 #16739] DEBUG -- : set sample rate
3043
+ D, [2010-06-06T17:43:16.152731 #16739] DEBUG -- : set access type
3044
+ D, [2010-06-06T17:43:16.152861 #16739] DEBUG -- : set channel count : 2
3045
+ D, [2010-06-06T17:43:16.153014 #16739] DEBUG -- : set sample format
3046
+ D, [2010-06-06T17:43:16.153125 #16739] DEBUG -- : set hw parameters
3047
+ D, [2010-06-06T17:43:16.153478 #16739] DEBUG -- : unallocate hw_params
3048
+ D, [2010-06-06T17:43:16.153556 #16739] DEBUG -- : close audio device
3049
+ D, [2010-06-06T17:43:16.154631 #16739] DEBUG -- : open audio device default
3050
+ D, [2010-06-06T17:43:16.160512 #16739] DEBUG -- : initialize hardware parameter structure
3051
+ D, [2010-06-06T17:43:16.160802 #16739] DEBUG -- : set sample rate
3052
+ D, [2010-06-06T17:43:16.161131 #16739] DEBUG -- : set access type
3053
+ D, [2010-06-06T17:43:16.161309 #16739] DEBUG -- : set channel count : 2
3054
+ D, [2010-06-06T17:43:16.161517 #16739] DEBUG -- : set sample format
3055
+ D, [2010-06-06T17:43:16.161669 #16739] DEBUG -- : set hw parameters
3056
+ D, [2010-06-06T17:43:16.161989 #16739] DEBUG -- : unallocate hw_params
3057
+ D, [2010-06-06T17:43:16.162136 #16739] DEBUG -- : retrieve current hardware parameters
3058
+ D, [2010-06-06T17:43:16.162244 #16739] DEBUG -- : get sample rate
3059
+ D, [2010-06-06T17:43:16.162371 #16739] DEBUG -- : retrieve current hardware parameters
3060
+ D, [2010-06-06T17:43:16.162994 #16739] DEBUG -- : get channels
3061
+ D, [2010-06-06T17:43:16.163076 #16739] DEBUG -- : start read with 44100, 2 channels
3062
+ D, [2010-06-06T17:43:16.163213 #16739] DEBUG -- : retrieve current hardware parameters
3063
+ D, [2010-06-06T17:43:16.163332 #16739] DEBUG -- : retrieve current hardware parameters
3064
+ D, [2010-06-06T17:43:16.163431 #16739] DEBUG -- : get sample rate
3065
+ D, [2010-06-06T17:43:16.163657 #16739] DEBUG -- : close audio device
3066
+ D, [2010-06-06T17:43:16.164983 #16739] DEBUG -- : open audio device default
3067
+ D, [2010-06-06T17:43:16.172760 #16739] DEBUG -- : initialize hardware parameter structure
3068
+ D, [2010-06-06T17:43:16.173057 #16739] DEBUG -- : set sample rate
3069
+ D, [2010-06-06T17:43:16.173374 #16739] DEBUG -- : set access type
3070
+ D, [2010-06-06T17:43:16.173542 #16739] DEBUG -- : set channel count : 2
3071
+ D, [2010-06-06T17:43:16.173740 #16739] DEBUG -- : set sample format
3072
+ D, [2010-06-06T17:43:16.173881 #16739] DEBUG -- : set hw parameters
3073
+ D, [2010-06-06T17:43:16.174196 #16739] DEBUG -- : unallocate hw_params
3074
+ D, [2010-06-06T17:43:16.174327 #16739] DEBUG -- : retrieve current hardware parameters
3075
+ D, [2010-06-06T17:43:16.174422 #16739] DEBUG -- : get sample rate
3076
+ D, [2010-06-06T17:43:16.174537 #16739] DEBUG -- : retrieve current hardware parameters
3077
+ D, [2010-06-06T17:43:16.174914 #16739] DEBUG -- : get channels
3078
+ D, [2010-06-06T17:43:16.174987 #16739] DEBUG -- : start read with 44100, 2 channels
3079
+ D, [2010-06-06T17:43:16.175096 #16739] DEBUG -- : retrieve current hardware parameters
3080
+ D, [2010-06-06T17:43:16.175199 #16739] DEBUG -- : retrieve current hardware parameters
3081
+ D, [2010-06-06T17:43:16.175291 #16739] DEBUG -- : get sample rate
3082
+ D, [2010-06-06T17:43:16.175486 #16739] DEBUG -- : close audio device
3083
+ D, [2010-06-06T17:43:16.177966 #16739] DEBUG -- : open audio device default
3084
+ D, [2010-06-06T17:43:16.179287 #16739] DEBUG -- : initialize hardware parameter structure
3085
+ D, [2010-06-06T17:43:16.179528 #16739] DEBUG -- : set sample rate
3086
+ D, [2010-06-06T17:43:16.179808 #16739] DEBUG -- : set access type
3087
+ D, [2010-06-06T17:43:16.179963 #16739] DEBUG -- : set channel count : 2
3088
+ D, [2010-06-06T17:43:16.180207 #16739] DEBUG -- : set sample format
3089
+ D, [2010-06-06T17:43:16.180327 #16739] DEBUG -- : set hw parameters
3090
+ D, [2010-06-06T17:43:16.180557 #16739] DEBUG -- : unallocate hw_params
3091
+ D, [2010-06-06T17:43:16.180651 #16739] DEBUG -- : write in audio interface
3092
+ D, [2010-06-06T17:43:16.180768 #16739] DEBUG -- : close audio device
3093
+ D, [2010-06-06T17:43:16.184372 #16739] DEBUG -- : dummy
3094
+ D, [2010-06-06T17:43:16.184854 #16739] DEBUG -- : dummy
3095
+ D, [2010-06-06T17:43:29.158232 #16748] DEBUG -- : open audio device default
3096
+ D, [2010-06-06T17:43:29.168502 #16748] DEBUG -- : initialize hardware parameter structure
3097
+ D, [2010-06-06T17:43:29.168788 #16748] DEBUG -- : set access type
3098
+ D, [2010-06-06T17:43:29.168956 #16748] DEBUG -- : set channel count : 2
3099
+ D, [2010-06-06T17:43:29.169146 #16748] DEBUG -- : set sample format
3100
+ D, [2010-06-06T17:43:29.169277 #16748] DEBUG -- : set sample rate
3101
+ D, [2010-06-06T17:43:29.169454 #16748] DEBUG -- : set hw parameters
3102
+ D, [2010-06-06T17:43:29.169765 #16748] DEBUG -- : unallocate hw_params
3103
+ D, [2010-06-06T17:43:29.169887 #16748] DEBUG -- : retrieve current hardware parameters
3104
+ D, [2010-06-06T17:43:29.169988 #16748] DEBUG -- : get sample rate
3105
+ D, [2010-06-06T17:43:29.170092 #16748] DEBUG -- : retrieve current hardware parameters
3106
+ D, [2010-06-06T17:43:29.170181 #16748] DEBUG -- : get channels
3107
+ D, [2010-06-06T17:43:29.170460 #16748] DEBUG -- : start read with 44100, 2 channels
3108
+ D, [2010-06-06T17:43:29.170558 #16748] DEBUG -- : retrieve current hardware parameters
3109
+ D, [2010-06-06T17:43:29.170650 #16748] DEBUG -- : retrieve current hardware parameters
3110
+ D, [2010-06-06T17:43:29.170739 #16748] DEBUG -- : get sample rate
3111
+ D, [2010-06-06T17:43:29.170937 #16748] DEBUG -- : close audio device
3112
+ D, [2010-06-06T17:43:46.126975 #16773] DEBUG -- : open audio device default
3113
+ D, [2010-06-06T17:43:46.137008 #16773] DEBUG -- : initialize hardware parameter structure
3114
+ D, [2010-06-06T17:43:46.137310 #16773] DEBUG -- : set access type
3115
+ D, [2010-06-06T17:43:46.137479 #16773] DEBUG -- : set channel count : 2
3116
+ D, [2010-06-06T17:43:46.137668 #16773] DEBUG -- : set sample format
3117
+ D, [2010-06-06T17:43:46.137800 #16773] DEBUG -- : set sample rate
3118
+ D, [2010-06-06T17:43:46.137979 #16773] DEBUG -- : set hw parameters
3119
+ D, [2010-06-06T17:43:46.138293 #16773] DEBUG -- : unallocate hw_params
3120
+ D, [2010-06-06T17:43:46.138415 #16773] DEBUG -- : retrieve current hardware parameters
3121
+ D, [2010-06-06T17:43:46.138517 #16773] DEBUG -- : get sample rate
3122
+ D, [2010-06-06T17:43:46.138621 #16773] DEBUG -- : retrieve current hardware parameters
3123
+ D, [2010-06-06T17:43:46.138709 #16773] DEBUG -- : get channels
3124
+ D, [2010-06-06T17:43:46.138781 #16773] DEBUG -- : start read with 44100, 2 channels
3125
+ D, [2010-06-06T17:43:46.138878 #16773] DEBUG -- : retrieve current hardware parameters
3126
+ D, [2010-06-06T17:43:46.138970 #16773] DEBUG -- : retrieve current hardware parameters
3127
+ D, [2010-06-06T17:43:46.139060 #16773] DEBUG -- : get sample rate
3128
+ D, [2010-06-06T17:43:46.139261 #16773] DEBUG -- : close audio device
3129
+ D, [2010-06-06T17:44:10.815757 #16804] DEBUG -- : open audio device default
3130
+ D, [2010-06-06T17:44:10.824745 #16804] DEBUG -- : initialize hardware parameter structure
3131
+ D, [2010-06-06T17:44:10.824955 #16804] DEBUG -- : set access type
3132
+ D, [2010-06-06T17:44:10.825070 #16804] DEBUG -- : set channel count : 2
3133
+ D, [2010-06-06T17:44:10.825197 #16804] DEBUG -- : set sample format
3134
+ D, [2010-06-06T17:44:10.825285 #16804] DEBUG -- : set sample rate
3135
+ D, [2010-06-06T17:44:10.825408 #16804] DEBUG -- : set hw parameters
3136
+ D, [2010-06-06T17:44:10.825622 #16804] DEBUG -- : unallocate hw_params
3137
+ D, [2010-06-06T17:44:10.825707 #16804] DEBUG -- : retrieve current hardware parameters
3138
+ D, [2010-06-06T17:44:10.825776 #16804] DEBUG -- : get sample rate
3139
+ D, [2010-06-06T17:44:10.825846 #16804] DEBUG -- : retrieve current hardware parameters
3140
+ D, [2010-06-06T17:44:10.825908 #16804] DEBUG -- : get channels
3141
+ D, [2010-06-06T17:44:10.825979 #16804] DEBUG -- : start read with 44100, 2 channels
3142
+ D, [2010-06-06T17:44:10.826044 #16804] DEBUG -- : retrieve current hardware parameters
3143
+ D, [2010-06-06T17:44:10.826106 #16804] DEBUG -- : retrieve current hardware parameters
3144
+ D, [2010-06-06T17:44:10.826167 #16804] DEBUG -- : get sample rate
3145
+ D, [2010-06-06T17:44:10.826238 #16804] DEBUG -- : get sample format
3146
+ D, [2010-06-06T17:44:10.826343 #16804] DEBUG -- : close audio device
3147
+ D, [2010-06-06T17:44:50.004559 #16858] DEBUG -- : open audio device default
3148
+ D, [2010-06-06T17:44:50.012402 #16858] DEBUG -- : initialize hardware parameter structure
3149
+ D, [2010-06-06T17:44:50.012616 #16858] DEBUG -- : set access type
3150
+ D, [2010-06-06T17:44:50.012740 #16858] DEBUG -- : set channel count : 2
3151
+ D, [2010-06-06T17:44:50.012877 #16858] DEBUG -- : set sample format
3152
+ D, [2010-06-06T17:44:50.012972 #16858] DEBUG -- : set sample rate
3153
+ D, [2010-06-06T17:44:50.013099 #16858] DEBUG -- : set hw parameters
3154
+ D, [2010-06-06T17:44:50.013324 #16858] DEBUG -- : unallocate hw_params
3155
+ D, [2010-06-06T17:44:50.013472 #16858] DEBUG -- : retrieve current hardware parameters
3156
+ D, [2010-06-06T17:44:50.013545 #16858] DEBUG -- : get sample rate
3157
+ D, [2010-06-06T17:44:50.013620 #16858] DEBUG -- : retrieve current hardware parameters
3158
+ D, [2010-06-06T17:44:50.013684 #16858] DEBUG -- : get channels
3159
+ D, [2010-06-06T17:44:50.013735 #16858] DEBUG -- : start read with 44100, 2 channels
3160
+ D, [2010-06-06T17:44:50.013802 #16858] DEBUG -- : retrieve current hardware parameters
3161
+ D, [2010-06-06T17:44:50.013868 #16858] DEBUG -- : retrieve current hardware parameters
3162
+ D, [2010-06-06T17:44:50.013932 #16858] DEBUG -- : get sample rate
3163
+ D, [2010-06-06T17:44:50.014008 #16858] DEBUG -- : get sample format
3164
+ D, [2010-06-06T17:44:50.014118 #16858] DEBUG -- : close audio device
3165
+ D, [2010-06-06T17:45:04.199439 #16881] DEBUG -- : open audio device default
3166
+ D, [2010-06-06T17:45:04.208678 #16881] DEBUG -- : initialize hardware parameter structure
3167
+ D, [2010-06-06T17:45:04.208959 #16881] DEBUG -- : set access type
3168
+ D, [2010-06-06T17:45:04.209126 #16881] DEBUG -- : set channel count : 2
3169
+ D, [2010-06-06T17:45:04.209315 #16881] DEBUG -- : set sample format
3170
+ D, [2010-06-06T17:45:04.209445 #16881] DEBUG -- : set sample rate
3171
+ D, [2010-06-06T17:45:04.209621 #16881] DEBUG -- : set hw parameters
3172
+ D, [2010-06-06T17:45:04.209930 #16881] DEBUG -- : unallocate hw_params
3173
+ D, [2010-06-06T17:45:04.210052 #16881] DEBUG -- : retrieve current hardware parameters
3174
+ D, [2010-06-06T17:45:04.210153 #16881] DEBUG -- : get sample rate
3175
+ D, [2010-06-06T17:45:04.210258 #16881] DEBUG -- : retrieve current hardware parameters
3176
+ D, [2010-06-06T17:45:04.210346 #16881] DEBUG -- : get channels
3177
+ D, [2010-06-06T17:45:04.210416 #16881] DEBUG -- : start read with 44100, 2 channels
3178
+ D, [2010-06-06T17:45:04.210510 #16881] DEBUG -- : retrieve current hardware parameters
3179
+ D, [2010-06-06T17:45:04.210601 #16881] DEBUG -- : retrieve current hardware parameters
3180
+ D, [2010-06-06T17:45:04.210692 #16881] DEBUG -- : get sample rate
3181
+ D, [2010-06-06T17:45:04.210790 #16881] DEBUG -- : get sample format
3182
+ D, [2010-06-06T17:45:04.210879 #16881] DEBUG -- : get channels
3183
+ D, [2010-06-06T17:45:04.210946 #16881] DEBUG -- : allocate 44100 bytes for 11025 frames
3184
+ D, [2010-06-06T17:45:04.211030 #16881] DEBUG -- : retrieve current hardware parameters
3185
+ D, [2010-06-06T17:45:04.211117 #16881] DEBUG -- : get sample format
3186
+ D, [2010-06-06T17:45:04.211203 #16881] DEBUG -- : get channels
3187
+ D, [2010-06-06T17:45:04.211307 #16881] DEBUG -- : read from audio interface
3188
+ D, [2010-06-06T17:45:04.485980 #16881] DEBUG -- : read from audio interface
3189
+ D, [2010-06-06T17:45:04.741976 #16881] DEBUG -- : read from audio interface
3190
+ D, [2010-06-06T17:45:04.997986 #16881] DEBUG -- : close audio device
3191
+ D, [2010-06-06T17:45:08.424372 #16888] DEBUG -- : open audio device default
3192
+ D, [2010-06-06T17:45:08.436382 #16888] DEBUG -- : initialize hardware parameter structure
3193
+ D, [2010-06-06T17:45:08.436604 #16888] DEBUG -- : set sample rate
3194
+ D, [2010-06-06T17:45:08.436839 #16888] DEBUG -- : set access type
3195
+ D, [2010-06-06T17:45:08.436963 #16888] DEBUG -- : set channel count : 2
3196
+ D, [2010-06-06T17:45:08.437216 #16888] DEBUG -- : set sample format
3197
+ D, [2010-06-06T17:45:08.437315 #16888] DEBUG -- : set hw parameters
3198
+ D, [2010-06-06T17:45:08.437545 #16888] DEBUG -- : unallocate hw_params
3199
+ D, [2010-06-06T17:45:08.437946 #16888] DEBUG -- : close audio device
3200
+ D, [2010-06-06T17:45:08.459823 #16888] DEBUG -- : open audio device default
3201
+ D, [2010-06-06T17:45:08.468606 #16888] DEBUG -- : initialize hardware parameter structure
3202
+ D, [2010-06-06T17:45:08.468897 #16888] DEBUG -- : set sample rate
3203
+ D, [2010-06-06T17:45:08.469221 #16888] DEBUG -- : set access type
3204
+ D, [2010-06-06T17:45:08.469463 #16888] DEBUG -- : set channel count : 2
3205
+ D, [2010-06-06T17:45:08.469666 #16888] DEBUG -- : set sample format
3206
+ D, [2010-06-06T17:45:08.469813 #16888] DEBUG -- : set hw parameters
3207
+ D, [2010-06-06T17:45:08.470133 #16888] DEBUG -- : unallocate hw_params
3208
+ D, [2010-06-06T17:45:08.470282 #16888] DEBUG -- : close audio device
3209
+ D, [2010-06-06T17:45:08.470825 #16888] DEBUG -- : open audio device default
3210
+ D, [2010-06-06T17:45:08.477213 #16888] DEBUG -- : initialize hardware parameter structure
3211
+ D, [2010-06-06T17:45:08.477523 #16888] DEBUG -- : set sample rate
3212
+ D, [2010-06-06T17:45:08.477853 #16888] DEBUG -- : set access type
3213
+ D, [2010-06-06T17:45:08.478033 #16888] DEBUG -- : set channel count : 2
3214
+ D, [2010-06-06T17:45:08.478252 #16888] DEBUG -- : set sample format
3215
+ D, [2010-06-06T17:45:08.478413 #16888] DEBUG -- : set hw parameters
3216
+ D, [2010-06-06T17:45:08.478760 #16888] DEBUG -- : unallocate hw_params
3217
+ D, [2010-06-06T17:45:08.478874 #16888] DEBUG -- : close audio device
3218
+ D, [2010-06-06T17:45:08.480150 #16888] DEBUG -- : open audio device default
3219
+ D, [2010-06-06T17:45:08.488502 #16888] DEBUG -- : initialize hardware parameter structure
3220
+ D, [2010-06-06T17:45:08.488804 #16888] DEBUG -- : set sample rate
3221
+ D, [2010-06-06T17:45:08.489337 #16888] DEBUG -- : set access type
3222
+ D, [2010-06-06T17:45:08.489516 #16888] DEBUG -- : set channel count : 2
3223
+ D, [2010-06-06T17:45:08.489725 #16888] DEBUG -- : set sample format
3224
+ D, [2010-06-06T17:45:08.489880 #16888] DEBUG -- : set hw parameters
3225
+ D, [2010-06-06T17:45:08.490205 #16888] DEBUG -- : unallocate hw_params
3226
+ D, [2010-06-06T17:45:08.490358 #16888] DEBUG -- : retrieve current hardware parameters
3227
+ D, [2010-06-06T17:45:08.490466 #16888] DEBUG -- : get sample rate
3228
+ D, [2010-06-06T17:45:08.490594 #16888] DEBUG -- : retrieve current hardware parameters
3229
+ D, [2010-06-06T17:45:08.490709 #16888] DEBUG -- : get channels
3230
+ D, [2010-06-06T17:45:08.490776 #16888] DEBUG -- : start read with 44100, 2 channels
3231
+ D, [2010-06-06T17:45:08.490901 #16888] DEBUG -- : retrieve current hardware parameters
3232
+ D, [2010-06-06T17:45:08.491005 #16888] DEBUG -- : retrieve current hardware parameters
3233
+ D, [2010-06-06T17:45:08.491098 #16888] DEBUG -- : get sample rate
3234
+ D, [2010-06-06T17:45:08.491209 #16888] DEBUG -- : get sample format
3235
+ D, [2010-06-06T17:45:08.491308 #16888] DEBUG -- : get channels
3236
+ D, [2010-06-06T17:45:08.491376 #16888] DEBUG -- : allocate 44100 bytes for 11025 frames
3237
+ D, [2010-06-06T17:45:08.491469 #16888] DEBUG -- : retrieve current hardware parameters
3238
+ D, [2010-06-06T17:45:08.491564 #16888] DEBUG -- : get sample format
3239
+ D, [2010-06-06T17:45:08.491659 #16888] DEBUG -- : get channels
3240
+ D, [2010-06-06T17:45:08.491797 #16888] DEBUG -- : read from audio interface
3241
+ D, [2010-06-06T17:45:08.765985 #16888] DEBUG -- : retrieve current hardware parameters
3242
+ D, [2010-06-06T17:45:08.766312 #16888] DEBUG -- : get sample format
3243
+ D, [2010-06-06T17:45:08.766521 #16888] DEBUG -- : get channels
3244
+ D, [2010-06-06T17:45:08.766781 #16888] DEBUG -- : close audio device
3245
+ D, [2010-06-06T17:45:08.767716 #16888] DEBUG -- : open audio device default
3246
+ D, [2010-06-06T17:45:08.776822 #16888] DEBUG -- : initialize hardware parameter structure
3247
+ D, [2010-06-06T17:45:08.777343 #16888] DEBUG -- : set sample rate
3248
+ D, [2010-06-06T17:45:08.777979 #16888] DEBUG -- : set access type
3249
+ D, [2010-06-06T17:45:08.778367 #16888] DEBUG -- : set channel count : 2
3250
+ D, [2010-06-06T17:45:08.778767 #16888] DEBUG -- : set sample format
3251
+ D, [2010-06-06T17:45:08.779042 #16888] DEBUG -- : set hw parameters
3252
+ D, [2010-06-06T17:45:08.779701 #16888] DEBUG -- : unallocate hw_params
3253
+ D, [2010-06-06T17:45:08.779959 #16888] DEBUG -- : retrieve current hardware parameters
3254
+ D, [2010-06-06T17:45:08.780207 #16888] DEBUG -- : get sample rate
3255
+ D, [2010-06-06T17:45:08.780429 #16888] DEBUG -- : retrieve current hardware parameters
3256
+ D, [2010-06-06T17:45:08.780626 #16888] DEBUG -- : get channels
3257
+ D, [2010-06-06T17:45:08.780758 #16888] DEBUG -- : start read with 44100, 2 channels
3258
+ D, [2010-06-06T17:45:08.780966 #16888] DEBUG -- : retrieve current hardware parameters
3259
+ D, [2010-06-06T17:45:08.781167 #16888] DEBUG -- : retrieve current hardware parameters
3260
+ D, [2010-06-06T17:45:08.781345 #16888] DEBUG -- : get sample rate
3261
+ D, [2010-06-06T17:45:08.781554 #16888] DEBUG -- : get sample format
3262
+ D, [2010-06-06T17:45:08.781746 #16888] DEBUG -- : get channels
3263
+ D, [2010-06-06T17:45:08.781879 #16888] DEBUG -- : allocate 44100 bytes for 11025 frames
3264
+ D, [2010-06-06T17:45:08.782059 #16888] DEBUG -- : retrieve current hardware parameters
3265
+ D, [2010-06-06T17:45:08.782246 #16888] DEBUG -- : get sample format
3266
+ D, [2010-06-06T17:45:08.782430 #16888] DEBUG -- : get channels
3267
+ D, [2010-06-06T17:45:08.782640 #16888] DEBUG -- : read from audio interface
3268
+ D, [2010-06-06T17:45:09.054115 #16888] DEBUG -- : read from audio interface
3269
+ D, [2010-06-06T17:45:09.331329 #16888] DEBUG -- : read from audio interface
3270
+ D, [2010-06-06T17:45:09.565970 #16888] DEBUG -- : close audio device
3271
+ D, [2010-06-06T17:45:09.569360 #16888] DEBUG -- : open audio device default
3272
+ D, [2010-06-06T17:45:09.572449 #16888] DEBUG -- : initialize hardware parameter structure
3273
+ D, [2010-06-06T17:45:09.572899 #16888] DEBUG -- : set sample rate
3274
+ D, [2010-06-06T17:45:09.573454 #16888] DEBUG -- : set access type
3275
+ D, [2010-06-06T17:45:09.573754 #16888] DEBUG -- : set channel count : 2
3276
+ D, [2010-06-06T17:45:09.574105 #16888] DEBUG -- : set sample format
3277
+ D, [2010-06-06T17:45:09.574341 #16888] DEBUG -- : set hw parameters
3278
+ D, [2010-06-06T17:45:09.574778 #16888] DEBUG -- : unallocate hw_params
3279
+ D, [2010-06-06T17:45:09.574964 #16888] DEBUG -- : write in audio interface
3280
+ D, [2010-06-06T17:45:09.575162 #16888] DEBUG -- : close audio device
3281
+ D, [2010-06-06T17:45:09.582668 #16888] DEBUG -- : dummy
3282
+ D, [2010-06-06T17:45:09.583909 #16888] DEBUG -- : dummy
data/ruby-alsa.gemspec CHANGED
@@ -6,11 +6,11 @@ Gem::Specification.new do |s|
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Alban Peignier"]
9
- s.date = %q{2010-04-25}
9
+ s.date = %q{2010-06-01}
10
10
  s.description = %q{FIX (describe your package)}
11
11
  s.email = ["alban@tryphon.eu"]
12
12
  s.extra_rdoc_files = ["History.txt", "Manifest.txt"]
13
- s.files = ["Gemfile", "History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "lib/alsa.rb", "script/console", "script/destroy", "script/generate", "spec/alsa/pcm_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/rspec.rake"]
13
+ s.files = [".autotest", "COPYING", "COPYRIGHT", "Gemfile", "History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "lib/alsa.rb", "lib/alsa/logger.rb", "lib/alsa/native.rb", "lib/alsa/pcm/capture.rb", "lib/alsa/pcm/hw_parameters.rb", "lib/alsa/pcm/native.rb", "lib/alsa/pcm/playback.rb", "lib/alsa/pcm/stream.rb", "log/test.log", "ruby-alsa.gemspec", "script/console", "script/destroy", "script/generate", "script/play", "script/record", "spec.html", "spec/alsa/logger_spec.rb", "spec/alsa/native_spec.rb", "spec/alsa/pcm/capture_spec.rb", "spec/alsa/pcm/native_spec.rb", "spec/alsa/pcm/playback_spec.rb", "spec/alsa/pcm/stream_spec.rb", "spec/alsa/pcm_spec.rb", "spec/alsa_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "spec/support/logger.rb", "tasks/buildbot.rake", "tasks/rspec.rake"]
14
14
  s.homepage = %q{http://projects.tryphon.eu/ruby-alsa}
15
15
  s.rdoc_options = ["--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Alban Peignier
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-25 00:00:00 +02:00
17
+ date: 2010-06-06 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -55,8 +55,8 @@ dependencies:
55
55
  segments:
56
56
  - 2
57
57
  - 6
58
- - 0
59
- version: 2.6.0
58
+ - 1
59
+ version: 2.6.1
60
60
  type: :development
61
61
  version_requirements: *id003
62
62
  description: FIX (describe your package)