Comments (6)
I haven't yet used ARC, but I think you can work around this problem by using objc_unretainedObject
and objc_unretainedPointer
:
// To set the callback
decoder->SetDecodingStartedCallback(decodingStarted, objc_unretainedPointer(self));
// In the callback
id me = objc_unretainedObject(context);
from sfbaudioengine.
Thanks for the reply, using objc_unretainedObject
gives me "Cannot initialize a parameter of type 'void *' with an rvalue of type 'objc_objectptr_t'"
from sfbaudioengine.
Until Xcode 4.2 is officially released I don't think I'll be much help with this, because I don't have it installed yet.
from sfbaudioengine.
One other thought- objc_objectptr_t
is a typedef for const void *
. Did you try explicitly casting context
to const void *
in the call to objc_unretainedObject
?
from sfbaudioengine.
Yet another idea, and I think this may be the correct answer:
// To set the callback
decoder->SetDecodingStartedCallback(decodingStarted, (__bridge void *)self);
// In the callback
id me = (__bridge id)context;
from sfbaudioengine.
The last solution seems to have done the trick :) This might be worth a note in the README.
from sfbaudioengine.
Related Issues (20)
- The opus file is seriously distorted, and only one side of the speaker has sound. HOT 3
- When the speex file is playing, only one side of the speaker has sound, and SFBAudioPlayer.totalTime is nil HOT 3
- I keep getting an error when converting to apple native format, like m4a aac HOT 4
- Total frames not calculated for Ogg Speex streams HOT 1
- When encoding to mp3, the bitrate is always 128kbps HOT 5
- LAME encoder settings are confusing HOT 1
- Whatβs the role of SFBFFmpegDecoder HOT 1
- How to set the output sampleRate HOT 1
- OPUS file duration in milliseconds HOT 3
- SFBFLACDecoder - decodeIntoBuffer - not decoding all frames HOT 5
- Add .podspec for Cocoapods
- Looping a decoder region doesn't work HOT 1
- Unable to stream MP3/WAV and possibly other formats HOT 3
- playReturningError failure HOT 6
- How to changed speed
- Importing Package HOT 2
- macOS 14+ dependencies? HOT 6
- Unable to convert some audio formats
- AudioDevice HOT 3
- Encoding .wav to .oggOpus HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sfbaudioengine.