jack-ffi 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,49 @@
1
+ = Introduction
2
+
3
+ This is a wrapper for JACK[http://www.jackaudio.org].
4
+
5
+ Here's a quick code sample. Currently no docs.
6
+
7
+ require 'jack'
8
+
9
+ JACK::Client.new("myname") do |jack|
10
+ port = jack.port_by_name("system:capture_1")
11
+ port.connect("system:playback_1")
12
+ sleep 5
13
+ port.disconnect("system:playback_1")
14
+ end
15
+
16
+
17
+ Please notice that code is rather alpha-version and can contain bugs.
18
+
19
+ = Installation
20
+
21
+ === Ruby Versions
22
+
23
+ It was tested with ruby 1.8.7 (2010-01-10 patchlevel 249).
24
+
25
+ === Gems
26
+
27
+ The driver's gems are hosted at Rubygems.org[http://rubygems.org]. Make sure you're
28
+ using the latest version of rubygems:
29
+
30
+ $ gem update --system
31
+
32
+ Then you can install the jack-ffi gem as follows:
33
+
34
+ $ gem install jack-ffi
35
+
36
+ === Ubuntu/Debian packages
37
+
38
+ You can grab this source code from GitHub as follows:
39
+
40
+ $ git clone http://github.com/saepia/libjack-ffi-ruby.git
41
+ $ cd libjack-ffi-ruby/
42
+ $ ./build-debian-package.sh
43
+ $ sudo dpkg -i libjack-ffi-ruby1.8_`cat VERSION`_all.deb libjack-ffi-ruby_`cat VERSION`_all.deb
44
+
45
+ === From the GitHub source
46
+
47
+ The source code is available at http://github.com/saepia/libjack-ffi-ruby.
48
+ You can either clone the git repository or download a tarball or zip file.
49
+ Once you have the source, you can unpack it and use from wherever you downloaded.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.3
@@ -45,7 +45,7 @@ module JACK
45
45
  def get_ports
46
46
  # TODO checking if i am connected
47
47
  # TODO parameters
48
- jack_get_ports(@server, nil, nil, 0).read_array_of_string_until_end
48
+ jack_get_ports(@server, nil, nil, 0).read_array_of_string_until_end.collect{ |port| Port.new(port, self) }
49
49
  end
50
50
 
51
51
  def port_by_name(name)
@@ -28,8 +28,14 @@ module JACK
28
28
  FLAGS_CAN_MONITOR = 0x8
29
29
  FLAGS_IS_TERMINAL = 0x10
30
30
 
31
- def initialize(pointer, client)
32
- @pointer, @client = pointer, client
31
+ def initialize(identifier, client)
32
+ @client = client
33
+
34
+ if identifier.is_a? String
35
+ @pointer = @client.port_by_name(identifier).pointer
36
+ else
37
+ @pointer = identifier
38
+ end
33
39
  end
34
40
 
35
41
  def name
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jack-ffi
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marcin Lewandowski
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-06 00:00:00 +02:00
18
+ date: 2010-09-07 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -38,8 +38,8 @@ executables: []
38
38
 
39
39
  extensions: []
40
40
 
41
- extra_rdoc_files: []
42
-
41
+ extra_rdoc_files:
42
+ - README.rdoc
43
43
  files:
44
44
  - GPL3-LICENSE
45
45
  - Rakefile
@@ -48,6 +48,7 @@ files:
48
48
  - lib/jack/client.rb
49
49
  - lib/jack/errors.rb
50
50
  - lib/jack/port.rb
51
+ - README.rdoc
51
52
  has_rdoc: true
52
53
  homepage: http://jack-ffi.saepia.net
53
54
  licenses: []