beeps 0.1.27 → 0.1.29
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.
- checksums.yaml +4 -4
- data/.doc/ext/beeps/exception.cpp +37 -0
- data/.doc/ext/beeps/native.cpp +2 -0
- data/VERSION +1 -1
- data/beeps.gemspec +2 -2
- data/ext/beeps/defs.h +1 -0
- data/ext/beeps/exception.cpp +37 -0
- data/ext/beeps/native.cpp +2 -0
- data/include/beeps/ruby/defs.h +26 -0
- data/include/beeps/ruby/exception.h +25 -0
- data/include/beeps/ruby/processor.h +0 -2
- data/include/beeps/ruby/sound.h +0 -2
- data/include/beeps/ruby.h +5 -0
- data/test/test_beeps.rb +2 -2
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e35966a4e3a60517e55adea4f74ae97c82ac1ae64339ab444bbd8d446df6f30
|
4
|
+
data.tar.gz: 4b60d83d564f349e05d975cc7adb4c42fc15edd6cd34adf1fe4681e847208c3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a178f8c91f640a308ed2350e1da9fa16e70693eba1a18ee2e46bd731d2520ac7230b3e97c9cce102c1d5e4d561dd07bcc3a7816f94784cf3eb2b9fb965df8a98
|
7
|
+
data.tar.gz: 7f7d73abc3f27f017de7926a8c507b5cf1d5f93e9af7a8ae1132da708a18543aa4a4c69f622c36792ee5434796cbd1438a8778c44beac3e2c965c71bae056e23
|
@@ -0,0 +1,37 @@
|
|
1
|
+
#include "beeps/ruby/exception.h"
|
2
|
+
|
3
|
+
|
4
|
+
#include "defs.h"
|
5
|
+
|
6
|
+
|
7
|
+
static Class cBeepsError;
|
8
|
+
static Class cOpenALError;
|
9
|
+
|
10
|
+
void
|
11
|
+
Init_exception ()
|
12
|
+
{
|
13
|
+
Module mBeeps = rb_define_module("Beeps");
|
14
|
+
|
15
|
+
cBeepsError = rb_define_class_under(mBeeps, "BeepsError", rb_eRuntimeError);
|
16
|
+
cOpenALError = rb_define_class_under(mBeeps, "OpenALError", cBeepsError);
|
17
|
+
}
|
18
|
+
|
19
|
+
|
20
|
+
namespace Beeps
|
21
|
+
{
|
22
|
+
|
23
|
+
|
24
|
+
Class
|
25
|
+
beeps_error_class ()
|
26
|
+
{
|
27
|
+
return cBeepsError;
|
28
|
+
}
|
29
|
+
|
30
|
+
Class
|
31
|
+
openal_error_class ()
|
32
|
+
{
|
33
|
+
return cOpenALError;
|
34
|
+
}
|
35
|
+
|
36
|
+
|
37
|
+
}// Beeps
|
data/.doc/ext/beeps/native.cpp
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.29
|
data/beeps.gemspec
CHANGED
@@ -28,8 +28,8 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.platform = Gem::Platform::RUBY
|
29
29
|
s.required_ruby_version = '>= 2.6.0'
|
30
30
|
|
31
|
-
s.add_runtime_dependency 'xot', '~> 0.1.
|
32
|
-
s.add_runtime_dependency 'rucy', '~> 0.1.
|
31
|
+
s.add_runtime_dependency 'xot', '~> 0.1.29'
|
32
|
+
s.add_runtime_dependency 'rucy', '~> 0.1.29'
|
33
33
|
|
34
34
|
s.files = `git ls-files`.split $/
|
35
35
|
s.executables = s.files.grep(%r{^bin/}) {|f| File.basename f}
|
data/ext/beeps/defs.h
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
#include "beeps/ruby/exception.h"
|
2
|
+
|
3
|
+
|
4
|
+
#include "defs.h"
|
5
|
+
|
6
|
+
|
7
|
+
static Class cBeepsError;
|
8
|
+
static Class cOpenALError;
|
9
|
+
|
10
|
+
void
|
11
|
+
Init_exception ()
|
12
|
+
{
|
13
|
+
Module mBeeps = define_module("Beeps");
|
14
|
+
|
15
|
+
cBeepsError = mBeeps.define_class("BeepsError", rb_eRuntimeError);
|
16
|
+
cOpenALError = mBeeps.define_class("OpenALError", cBeepsError);
|
17
|
+
}
|
18
|
+
|
19
|
+
|
20
|
+
namespace Beeps
|
21
|
+
{
|
22
|
+
|
23
|
+
|
24
|
+
Class
|
25
|
+
beeps_error_class ()
|
26
|
+
{
|
27
|
+
return cBeepsError;
|
28
|
+
}
|
29
|
+
|
30
|
+
Class
|
31
|
+
openal_error_class ()
|
32
|
+
{
|
33
|
+
return cOpenALError;
|
34
|
+
}
|
35
|
+
|
36
|
+
|
37
|
+
}// Beeps
|
data/ext/beeps/native.cpp
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
// -*- c++ -*-
|
2
|
+
#pragma once
|
3
|
+
#ifndef __BEEPS_RUBY_DEFS_H__
|
4
|
+
#define __BEEPS_RUBY_DEFS_H__
|
5
|
+
|
6
|
+
|
7
|
+
#include <rucy/extension.h>
|
8
|
+
#include <beeps/ruby/exception.h>
|
9
|
+
|
10
|
+
|
11
|
+
#define BEEPS_CATCH \
|
12
|
+
} \
|
13
|
+
catch (const Beeps::OpenALError& e) \
|
14
|
+
{ \
|
15
|
+
RUCY_RAISE(Beeps::openal_error_class(), e.what()); \
|
16
|
+
} \
|
17
|
+
catch (const Beeps::BeepsError& e) \
|
18
|
+
{ \
|
19
|
+
RUCY_RAISE(Beeps::beeps_error_class(), e.what());
|
20
|
+
|
21
|
+
#define RUCY_END \
|
22
|
+
BEEPS_CATCH \
|
23
|
+
RUCY_DEF_END
|
24
|
+
|
25
|
+
|
26
|
+
#endif//EOH
|
@@ -0,0 +1,25 @@
|
|
1
|
+
// -*- c++ -*-
|
2
|
+
#pragma once
|
3
|
+
#ifndef __BEEPS_RUBY_EXCEPTION_H__
|
4
|
+
#define __BEEPS_RUBY_EXCEPTION_H__
|
5
|
+
|
6
|
+
|
7
|
+
#include <rucy/class.h>
|
8
|
+
#include <beeps/exception.h>
|
9
|
+
|
10
|
+
|
11
|
+
namespace Beeps
|
12
|
+
{
|
13
|
+
|
14
|
+
|
15
|
+
Rucy::Class beeps_error_class ();
|
16
|
+
// class Beeps::BeepsError
|
17
|
+
|
18
|
+
Rucy::Class openal_error_class ();
|
19
|
+
// class Beeps::OpenALError
|
20
|
+
|
21
|
+
|
22
|
+
}// Beeps
|
23
|
+
|
24
|
+
|
25
|
+
#endif//EOH
|
data/include/beeps/ruby/sound.h
CHANGED
data/include/beeps/ruby.h
CHANGED
data/test/test_beeps.rb
CHANGED
@@ -9,9 +9,9 @@ require_relative 'helper'
|
|
9
9
|
class TestBeeps < Test::Unit::TestCase
|
10
10
|
|
11
11
|
def test_init!()
|
12
|
-
assert_raise(
|
12
|
+
assert_raise(Beeps::BeepsError) {Beeps.fin!}
|
13
13
|
assert Beeps.init!
|
14
|
-
assert_raise(
|
14
|
+
assert_raise(Beeps::BeepsError) {Beeps.init!}
|
15
15
|
assert Beeps.fin!
|
16
16
|
end
|
17
17
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beeps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xordog
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xot
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1.
|
19
|
+
version: 0.1.29
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.1.
|
26
|
+
version: 0.1.29
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rucy
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.1.
|
33
|
+
version: 0.1.29
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.1.
|
40
|
+
version: 0.1.29
|
41
41
|
description: Synthesize and play beep sounds.
|
42
42
|
email: xordog@gmail.com
|
43
43
|
executables: []
|
@@ -45,6 +45,7 @@ extensions:
|
|
45
45
|
- Rakefile
|
46
46
|
extra_rdoc_files:
|
47
47
|
- ".doc/ext/beeps/beeps.cpp"
|
48
|
+
- ".doc/ext/beeps/exception.cpp"
|
48
49
|
- ".doc/ext/beeps/file_in.cpp"
|
49
50
|
- ".doc/ext/beeps/native.cpp"
|
50
51
|
- ".doc/ext/beeps/processor.cpp"
|
@@ -54,6 +55,7 @@ extra_rdoc_files:
|
|
54
55
|
- ".doc/ext/beeps/square_wave.cpp"
|
55
56
|
files:
|
56
57
|
- ".doc/ext/beeps/beeps.cpp"
|
58
|
+
- ".doc/ext/beeps/exception.cpp"
|
57
59
|
- ".doc/ext/beeps/file_in.cpp"
|
58
60
|
- ".doc/ext/beeps/native.cpp"
|
59
61
|
- ".doc/ext/beeps/processor.cpp"
|
@@ -67,6 +69,7 @@ files:
|
|
67
69
|
- beeps.gemspec
|
68
70
|
- ext/beeps/beeps.cpp
|
69
71
|
- ext/beeps/defs.h
|
72
|
+
- ext/beeps/exception.cpp
|
70
73
|
- ext/beeps/extconf.rb
|
71
74
|
- ext/beeps/file_in.cpp
|
72
75
|
- ext/beeps/native.cpp
|
@@ -83,6 +86,8 @@ files:
|
|
83
86
|
- include/beeps/processor.h
|
84
87
|
- include/beeps/ruby.h
|
85
88
|
- include/beeps/ruby/beeps.h
|
89
|
+
- include/beeps/ruby/defs.h
|
90
|
+
- include/beeps/ruby/exception.h
|
86
91
|
- include/beeps/ruby/processor.h
|
87
92
|
- include/beeps/ruby/sound.h
|
88
93
|
- include/beeps/signals.h
|