• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Trimming audio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trimming audio


  • Subject: Re: Trimming audio
  • From: Santosh Kumar <email@hidden>
  • Date: Fri, 13 Feb 2009 14:56:37 +0530

Hi ,
Here is my code.Here i am writing content of first file to second but second file doesn't contain any data.
NSData *pcmData = [NSData dataWithContentsOfFile:sourceFile];
unsigned int length = [pcmData length] / sizeof( float );
UInt32 inBytesLength = length * audioFormat.mBytesPerFrame;
UInt32 maxPacketSize;
UInt32 propertySize = sizeof (maxPacketSize);
AudioFileGetProperty (audioFileID,AudioFilePropertyPacketSizeUpperBound,&propertySize,&maxPacketSize);
SInt16 startingByte = 0;
void *Buffer =  malloc(inBytesLength);
void *newBuffer;
sts = AudioFileReadBytes(fileID,NO,startingByte,&inBytesLength, Buffer);
//Writing part
AudioFileWriteBytes(newFileID,NO,startingByte,&inBytesLength,newBuffer);


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Trimming audio
  • Next by Date: Re: Plugin delay compensation
  • Previous by thread: Re: Trimming audio
  • Next by thread: Re: Trimming audio
  • Index(es):
    • Date
    • Thread