-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #896 from IsakTheHacker/miniaudio
Add package: miniaudio
- Loading branch information
Showing
4 changed files
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package: | ||
name: miniaudio | ||
version: 1.59 | ||
|
||
build: | ||
number: 1 | ||
|
||
requirements: | ||
build: | ||
- cffi 1.15.1 |
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,13 @@ | ||
--- src-original/build_ffi_module.py 2023-06-04 14:39:41.000000000 +0000 | ||
+++ src/build_ffi_module.py 2023-07-23 10:11:23.154952325 +0000 | ||
@@ -828,6 +828,10 @@ | ||
Test if linker on system needs libatomic. | ||
This has been copied from https://github.com/grpc/grpc/blob/master/setup.py#L205 | ||
""" | ||
+ # Chaquopy: we do need libatomic, at least on x86, but this test doesn't return true | ||
+ # for some reason. | ||
+ return True | ||
+ | ||
code_test = (b'#include <atomic>\n' + | ||
b'int main() { return std::atomic<int64_t>{}; }') | ||
cxx = shlex.split(os.environ.get('CXX', 'c++')) |
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,12 @@ | ||
from os.path import dirname, join | ||
import unittest | ||
|
||
class TestMiniaudio(unittest.TestCase): | ||
|
||
def test_mp3(self): | ||
import miniaudio | ||
|
||
info = miniaudio.mp3_get_file_info(join(dirname(__file__), "sample.mp3")) | ||
self.assertAlmostEqual(info.duration, 10.1093878) | ||
self.assertEqual(info.sample_format, miniaudio.SampleFormat.SIGNED16) | ||
self.assertEqual(info.nchannels, 2) |
Binary file not shown.