audite 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "audite"
5
- s.version = "0.1.4"
5
+ s.version = "0.1.5"
6
6
  s.author = "Matthias Georgi"
7
7
  s.email = "matti.georgi@gmail.com"
8
8
  s.homepage = "http://georgi.github.com/audite"
data/bin/audite CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require 'rubygems'
3
4
  require 'audite'
4
5
  require 'curses'
5
6
 
@@ -10,4 +10,6 @@ unless have_library('portaudio')
10
10
  exit
11
11
  end
12
12
 
13
+ have_type('PaStreamCallbackTimeInfo', 'portaudio.h')
14
+
13
15
  create_makefile('portaudio')
@@ -28,13 +28,20 @@ void free_portaudio(void *ptr)
28
28
  }
29
29
  }
30
30
 
31
-
31
+ #ifdef HAVE_TYPE_PASTREAMCALLBACKTIMEINFO
32
32
  static int paCallback(const void *inputBuffer,
33
33
  void *outputBuffer,
34
34
  unsigned long framesPerBuffer,
35
35
  const PaStreamCallbackTimeInfo* timeInfo,
36
36
  PaStreamCallbackFlags statusFlags,
37
37
  void *userData )
38
+ #else
39
+ static int paCallback(void *inputBuffer,
40
+ void *outputBuffer,
41
+ unsigned long framesPerBuffer,
42
+ PaTimestamp outTime,
43
+ void *userData )
44
+ #endif
38
45
  {
39
46
  Portaudio *portaudio = (Portaudio *) userData;
40
47
  float *out = (float*) outputBuffer;
@@ -70,6 +77,9 @@ VALUE rb_portaudio_new(VALUE klass)
70
77
  paFloat32, /* 32 bit floating point output */
71
78
  44100, /* 44100 sample rate*/
72
79
  4096, /* frames per buffer */
80
+ #ifndef HAVE_TYPE_PASTREAMCALLBACKTIMEINFO
81
+ 1, /* number of buffer */
82
+ #endif
73
83
  paCallback, /* this is your callback function */
74
84
  (void*) portaudio);
75
85
 
@@ -104,7 +114,11 @@ VALUE rb_portaudio_write(VALUE self, VALUE buffer)
104
114
  portaudio->buffer[i] = NUM2DBL(rb_ary_entry(buffer, i));
105
115
  }
106
116
 
117
+ #ifdef RUBY_UBF_IO
107
118
  rb_thread_blocking_region(portaudio_wait, portaudio, RUBY_UBF_IO, NULL);
119
+ #else
120
+ portaudio_wait(portaudio);
121
+ #endif
108
122
 
109
123
  return self;
110
124
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: audite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: