matthewreagan / starling Goto Github PK
View Code? Open in Web Editor NEWSimple low-latency audio library for iOS + macOS
License: Other
Simple low-latency audio library for iOS + macOS
License: Other
We've ran into a crash in Starling due to an unhandled Objective-C exception originating within AVFAudio framework:
Last Exception Backtrace:
0 CoreFoundation 0x1a1dade88 __exceptionPreprocess + 164 (NSException.m:202)
1 libobjc.A.dylib 0x19b0d78d8 objc_exception_throw + 60 (objc-exception.mm:356)
2 CoreFoundation 0x1a1f1a814 +[NSException raise:format:arguments:] + 96 (NSException.m:0)
3 AVFAudio 0x1b87314a4 AVAE_RaiseException(NSString*, ...) + 52 (AVAEInternal.h:69)
4 AVFAudio 0x1b880dc54 AVAudioPlayerNodeImpl::StartImpl(AVAudioTime*) + 2876 (AVAudioPlayerNode.mm:660)
5 AVFAudio 0x1b8731994 AVAudioNodeImplBase::Start(AVAudioTime*) + 64 (AVAudioNodeImpl.h:162)
6 AVFAudio 0x1b880a794 -[AVAudioPlayerNode play] + 68 (AVAudioPlayerNode.mm:1138)
7 xxxxxxxxxxxxxx 0x105127c70 StarlingAudioPlayer.play(_:identifier:) + 284 (Starling.swift:300)
8 xxxxxxxxxxxxxx 0x10512712c performPlaybackOnFirstAvailablePlayer #1 () in Starling.performSoundPlayback(_:allowOverlap:) + 764 (Starling.swift:139)
9 xxxxxxxxxxxxxx 0x105126e1c Starling.performSoundPlayback(_:allowOverlap:) + 832 (Starling.swift:0)
10 xxxxxxxxxxxxxx 0x105128fec closure #1 in Starling.play(_:allowOverlap:) + 60 (Starling.swift:106)
11 xxxxxxxxxxxxxx 0x105128fec partial apply for closure #1 in Starling.play(_:allowOverlap:) + 96 (<compiler-generated>:0)
12 xxxxxxxxxxxxxx 0x105126428 thunk for @escaping @callee_guaranteed () -> () + 28 (<compiler-generated>:0)
13 libdispatch.dylib 0x1a937c4b4 _dispatch_call_block_and_release + 32 (init.c:1518)
14 libdispatch.dylib 0x1a937dfdc _dispatch_client_callout + 20 (object.m:560)
15 libdispatch.dylib 0x1a938fb8c _dispatch_root_queue_drain + 684 (inline_internal.h:2632)
16 libdispatch.dylib 0x1a9390284 _dispatch_worker_thread2 + 164 (queue.c:7052)
17 libsystem_pthread.dylib 0x1eee07dbc _pthread_wqthread + 228 (pthread.c:2631)
18 libsystem_pthread.dylib 0x1eee07b98 start_wqthread + 8 (:-1)
I was going to submit a PR wrapping node.play()
call in ExceptionCatcher.catch, but realized that right now Starling doesn't have any external dependencies, and going down this route will introduce one.
@matthewreagan Would that be okay, or would you prefer a different approach?
Seems every time you do starling play it increases the memory use and never releases it again. Using it in my app it just keeps increasing the memory (playing sounds often).
Shame this is a really neat library otherwise!
Hey, I'm working on a react-native-macos plugin that uses Starling:
https://github.com/alloc/react-native-sound
I've patched Starling to support playing "raw data" (see here), but I'm getting an EXC_BAD_ACCESS
error every time I try to play .wav
file data (loaded over-the-wire) from its generated AVAudioPCMBuffer
object.
I'm opening this issue to ask for advice on what I should do next. Do you think the .wav
buffer needs a specific format for macOS, or perhaps it needs to be manually decoded first? Would you suggest I just save the data to a file and use the AVAudioFile
API instead? Or maybe I should just use AVAudioPlayer
instead of AVAudioEngine
? Any suggestions would be great!
I also created a SO thread for this:
https://stackoverflow.com/questions/55306996/playing-wav-data-with-avaudioengine
I would like to be able to adjust the volume of the starling player. Thanks
Getting some output in console from Starling.
AddInstanceForFactory: No factory registered for id
couldn't get default input device, ID = 0, err = 0!
AudioObjectGetPropertyData: no object with given ID 0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.