Comments (6)
My quick workaround for this is:
in AudioFileWriter.m
- (id)initWithAudioFileURL:(NSURL *)urlToAudioFile samplingRate:(float)thisSamplingRate numChannels:(UInt32)thisNumChannels
just above the line with CheckEroor(ExtAudioFileCreateWithURL... i added the following code which removes the file if it already exists:
if ([[NSFileManager defaultManager] fileExistsAtPath:[urlToAudioFile path]]) {
[[NSFileManager defaultManager] removeItemAtURL:urlToAudioFile error:nil] ;
}
from novocaine.
but here is a much better solution, this should go into the rep
CheckError(ExtAudioFileCreateWithURL(audioFileRef, kAudioFileM4AType, &outputFileDesc, NULL, kAudioFileFlags_EraseFile, &_outputFile), "Creating file");
kAudioFileFlags_EraseFile does the trick, currently 0 is passed for flags.
from novocaine.
This is a great addition. Make a pull request, I'll roll it in.
On Tuesday, August 21, 2012 at 7:23 AM, sn-e5 wrote:
My quick workaround for this is:
in
(id)initWithAudioFileURL:(NSURL *)urlToAudioFile samplingRate:(float)thisSamplingRate numChannels:(UInt32)thisNumChannelsjust above the line with CheckEroor(ExtAudioFileCreateWithURL... i added the following code which removes the file if it already exists:
if ([[NSFileManager defaultManager] fileExistsAtPath:[urlToAudioFile path]]) {
[[NSFileManager defaultManager] removeItemAtURL:urlToAudioFile error:nil] ;
}—
Reply to this email directly or view it on GitHub (#30 (comment)).
from novocaine.
hi alex, did the pull request, my first ever ;). btw, thank you for your awesome work, it is extremely useful to me.
from novocaine.
Roger that, I'll test the commit and merge it in. Glad you dig the project!
On Tuesday, August 21, 2012 at 7:57 AM, sn-e5 wrote:
hi alex, did the pull request, my first ever ;). btw, thank you for your awesome work, it is extremely useful to me.
—
Reply to this email directly or view it on GitHub (#30 (comment)).
from novocaine.
Sent from a phone.
On 2012-08-21, at 7:12 AM, sn-e5 [email protected] wrote:
Hi
When I uncomment the filewrite example code in the demo view controller, on the first run everything is fine, but on the second run,
CheckError(ExtAudioFileCreateWithURL(audioFileRef, kAudioFileM4AType, &outputFileDesc, NULL, 0, &_outputFile), "Creating file");
exits the app with error code -48, which is declared in MacErrors.h as duplicate filename.
I will try to find a work around this and post it here.
best
—
Reply to this email directly or view it on GitHub.
from novocaine.
Related Issues (20)
- Audio distortion isuue while playing on iphone speaker HOT 1
- 1
- use of @autoreleasepool in renderCallback and inputCallback HOT 1
- inputblock + outputblock + forceOutputToSpeaker = Error: Couldn't render the output unit (-50) HOT 1
- Can't play an audio file that was downloaded from server but the data is the same HOT 1
- Music from the Internet HOT 1
- What exactly comes from the newAudio variable?
- Bluetooth Audio? HOT 3
- updateMeters and averagePowerForChannel equivalents for Novocaine? HOT 2
- Setting deployment target to 8.0 causes demo app to crash HOT 2
- Is there anyway to properly convert the audio array (float*) into UTF 8? HOT 7
- m4a files
- Gapless
- RingBuffer.h - class RingBuffer syntax error HOT 3
- Use of deprecated AudioSession APIs on Novocaine.m HOT 2
- How to 8000hz/16000hz get or put as short* array for audio ?
- Is this library suitable to make a lack-in amplifier from microphone input?
- Couldn't initialize the output unit ('!cat') on Device only HOT 1
- Mac Catalyst (UIKit for Mac) support
- Does default sample rate cause resampling and setting buffer size for minimum latency? HOT 1
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 novocaine.