Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7970511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:24:39+00:00 2026-06-04T07:24:39+00:00

Ok so I have this method (found here ). It appends 2 wav files

  • 0

Ok so I have this method (found here). It appends 2 wav files together to play them afterwards. The method gets called like this:

if(soundFileURL != nil) {
    NSURL *tempURL = [WavUtils mergeFile1:finalSoundFileURL withFile2:soundFileURL];

    if(tempURL != nil) {
        NSLog(@"Wav files have been merged: %@", [tempURL absoluteString]);
        finalSoundFileURL = [tempURL retain];
        [soundFileURL release];
        soundFileURL = nil;
        [recorder release];
        recorder = nil;
    } else {
        NSLog(@"Wav files could not be merged.");
    }
}

The retain in finalSoundFileURL = [tempURL retain]; has been replaced with many other things than retain but it doesn’t work at all. When the merging is done i check what the file contains with this:

NSLog(@"Calculated: %d - Real: %d", totalLength, [soundFileData length]);
NSLog(@"From file: %d", [[NSData dataWithContentsOfURL:file1] length]);

This shows the following in the log:

2012-01-02 18:20:28.549 App[2186:207] Calculated: 72146 - Real: 72146
2012-01-02 18:20:28.549 App[2186:207] From file: 72146

So the file is filled, the NSURL is filled and points to the correct file. But when i try to send this file to the server i check again with this:

NSLog(@"Adding file: %@ with length: %d", [finalSoundFileURL absoluteString], [[NSData dataWithContentsOfURL:finalSoundFileURL] length]);

But this returns the following:

2012-01-02 18:22:38.980 App[2186:207] Adding file: (null) with length: 0

This leads me to beleve it’s an autorelease problem, but I can’t find it! If anyone has any idea where it could be, please tell me.

Regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:24:39+00:00Added an answer on June 4, 2026 at 7:24 am

    Sorry for not posting this sooner but the problem was a bad release/autorelease call on the variable before it was sent to the method described in the question. I found it by following the variable from start to end and check what it’s doing and what happens to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this method to transfer files using a FTP Server: private void TransferNeededFiles(IEnumerable<string>
I have this method, that will be called against from a WCF Client, but
I have read about this from several places. I have tried the method found
I've found this method here . start = DateTime.now sleep 15 stop = DateTime.now
I have this method that changes an larger image source on click. I need
I have this method for grabbing the file name from a string URI. What
I have this method call I have to use... financial_document.assets.length But financial_document.assets could be
I have this method in cs page: public String getToolTip(Object productId, Object imgBtnId) {
I have this method which will remove all rows from a table but I
I have this method: internal static void AssignNewArrayItem(ref Xml.CLASSNAME[] Items, Xml.CLASSNAME Item) { if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.