osxdsp 0.0.1

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.
Files changed (8) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/Gemfile +3 -0
  4. data/README.md +42 -0
  5. data/Rakefile +1 -0
  6. data/lib/osxdsp.rb +19 -0
  7. data/osxdsp.gemspec +22 -0
  8. metadata +78 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ce120f7128f88f6732a86495a3bd8756898989c2
4
+ data.tar.gz: d40592614e016515162010bcffe93f405f8e3d08
5
+ SHA512:
6
+ metadata.gz: dbf301307f317091fb26c2483c3d2bdd3baf0bc0321a509b0b7b0cefc76591f05f63ce95ab91aef51e7c0065b677e43b2df5c32d6c4307d9edf3ed37d306f6e6
7
+ data.tar.gz: 743dd294ebc4f6b56aca86c13ba3ab1548897fe6218629267a222a10ee686b2e766ecde0fc9c08c7ccfb7de930c54e1c74bce9d88c933fc76148c2f041af6a85
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # OSXDsp
2
+
3
+ ## What's This?
4
+
5
+ `/dev/dsp` emulator for os x.
6
+
7
+ ## Requirement
8
+
9
+ * Ruby 2.0.0 or lator.
10
+ * [sox](http://sox.sourceforge.net/)
11
+
12
+ ## How to Use
13
+
14
+ Simply require it. After requiring, you can write PCM to pseudo I/O via open "/dev/dsp".
15
+
16
+ ## See also
17
+
18
+ * [windsp](https://github.com/unak/windsp) for Windows by unak.
19
+
20
+ ## License
21
+
22
+ Copyright (c) 2015 Yusuke Endoh <[email protected]>
23
+
24
+ Redistribution and use in source and binary forms, with or without
25
+ modification, are permitted provided that the following conditions are met:
26
+
27
+ 1. Redistributions of source code must retain the above copyright notice,
28
+ this list of conditions and the following disclaimer.
29
+ 2. Redistributions in binary form must reproduce the above copyright notice,
30
+ this list of conditions and the following disclaimer in the documentation
31
+ and/or other materials provided with the distribution.
32
+
33
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
34
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
35
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
36
+ DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
37
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
38
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
39
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
40
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
41
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
42
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/lib/osxdsp.rb ADDED
@@ -0,0 +1,19 @@
1
+ class OSXDsp
2
+ VERSION = "0.0.1"
3
+ end
4
+
5
+ module Kernel
6
+ private
7
+ alias osxdsp_orig_open open
8
+ class << self
9
+ alias osxdsp_orig_open open
10
+ end
11
+ def open(name, *rest, &block)
12
+ if name == "/dev/dsp"
13
+ IO.popen(%w(sox -q -traw -r8000 -b8 -e unsigned-integer --input-buffer 64 - -d), *rest, &block)
14
+ else
15
+ osxdsp_orig_open(name, *rest, &block)
16
+ end
17
+ end
18
+ module_function :open
19
+ end
data/osxdsp.gemspec ADDED
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ require File.expand_path('lib/osxdsp')
3
+
4
+ Gem::Specification.new do |spec|
5
+ spec.name = "osxdsp"
6
+ spec.version = OSXDsp::VERSION
7
+ spec.authors = ["Yusuke Endoh"]
8
+ spec.email = ["[email protected]"]
9
+
10
+ spec.summary = %q{`/dev/dsp` emulator for os x}
11
+ spec.description = %q{`/dev/dsp` emulator for os x}
12
+ spec.homepage = "https://github.com/mame/osxdsp/"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
16
+ spec.bindir = "exe"
17
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_development_dependency "bundler", "~> 1.9"
21
+ spec.add_development_dependency "rake", "~> 10.0"
22
+ end
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: osxdsp
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Yusuke Endoh
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-05-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.9'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: "`/dev/dsp` emulator for os x"
42
+ email:
43
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - README.md
51
+ - Rakefile
52
+ - lib/osxdsp.rb
53
+ - osxdsp.gemspec
54
+ homepage: https://github.com/mame/osxdsp/
55
+ licenses:
56
+ - MIT
57
+ metadata: {}
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ requirements: []
73
+ rubyforge_project:
74
+ rubygems_version: 2.4.7
75
+ signing_key:
76
+ specification_version: 4
77
+ summary: "`/dev/dsp` emulator for os x"
78
+ test_files: []
OSZAR »