-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix fatal error on lack of device on linux
- Loading branch information
Showing
8 changed files
with
89 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,3 @@ if defined? RSpec | |
end | ||
end | ||
task default: :spec | ||
task test: :spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Device | ||
Abstracts physical devices | ||
it can be opened | ||
it can be closed | ||
it can be written to | ||
in that you write to its buffer | ||
it can be flushed | ||
in that its buffer is flushed | ||
it can be played | ||
in that its buffer is written to and immediately flushed | ||
you can write any Data to it | ||
it has a identification | ||
|
||
Data | ||
Abstracts real world sound data | ||
it can have various formats | ||
it can be writte to a device | ||
it can have data which corresponds to its format | ||
|
||
Format | ||
Abstracts real world data interpretation | ||
it can be PCM or MIDI | ||
if it's PCM | ||
it has a sample rate | ||
it is has some number of channels | ||
it has a bit depth per sample | ||
it has a bit rate per second | ||
if it's MIDI | ||
I have no idea what MIDI looks like | ||
|
||
|
||
Consider extending corresponding class to platform in lib/sound.rb | ||
so that in lib/sound/device.rb I can write open(args) instead of Win32::PCM.open | ||
I like this because it takes away platfrom decision logic from Sound::Device. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
require 'sound' | ||
Sound.testing = true | ||
require 'sound' |