RE: Saving an AudioFile without an extension
RE: Saving an AudioFile without an extension
- Subject: RE: Saving an AudioFile without an extension
- From: "Asher Vander Heiden" <email@hidden>
- Date: Mon, 12 Jul 2004 20:05:28 +1000
Hey,
I'm having trouble with using the 'FSMakeFSSpec' to make a 'FSSpec' !
As far as I can tell to use 'FSMakeFSSpec' I will do something like this:
FSSpec fspec;
char* destFilePath = "/Users/lachlanbarratt/Desktop/NewFile";
error = FSMakeFSSpec(0,0,destFilePath,&fspec);
Now why does this destination file path (destFilePath) not work in this
function ???!!!????
It says that the error is that "destFilePath" should be an "unsigned char*"
for some strange reason!
Even when I create a path name that is an "unsigned char*" It still Doesn't
Work!!!!
What am I doing wrong here?
Please help ...... I am pulling my hair out .....
I cannot explain why Apple have decided to use so many different types of
strings ??? I've probably wasted about 2 weeks work just trying to satisfy
all of Apples string requirements. This is the first and maybe the last time
I work with Apple.
Thankyou for any help,
Asher Vander Heiden
From: "Tim Dorcey" <email@hidden>
Reply-To: <email@hidden>
To: "'Asher Vander Heiden'" <email@hidden>
Subject: RE: Saving an AudioFile without an extension
Date: Fri, 2 Jul 2004 08:35:08 -0700
You can use FSpSetFInfo to set the Finder "Creator" and "Filetype", after
you have created the file:
FSSpec fspec; // file spec
FInfo finfo; // finder info
if( FSpGetFInfo(&fspec,&finfo) != noErr ) {
finfo.fdCreator = 'XXXX';
finfo.fdType = 'XXXX';
FSpSetFInfo(&fspect,&finfo);
}
You will need to figure out what the appropriate creator and type should
be,
e.g., by doing an FSpGetFInfo on a SoundDesigner2 file. Use FSMakeFSSpec
to
convert a file path into an FSSpec.
As someone else mentioned, OSX is moving away from this old style "Finder
Info" way of identifying file contents, so I don't know if this is wise.
If
SoundDesigner2 is an OSX-only app, it may not even be possible.
Tim
> -----Original Message-----
> From: email@hidden
> [mailto:email@hidden]On Behalf Of Asher Vander
> Heiden
> Sent: Thursday, July 01, 2004 10:20 PM
> To: email@hidden
> Subject: Saving an AudioFile without an extension
>
>
> Hello All its me again,
>
> I'm having a bit of trouble with the 'AudioToolbox' and the
> wrapper files in
> auprocess.cpp.
>
> What I'm trying to do is to save a new Audio File as a
> SoundDesigner2 file
> without having to specify an extension in the 'destFilePath' .
> Here's some of the code:
>
> char* destFilePath = "/Users/lachlanbarratt/Desktop/NewFile";
> CAAudioFile destFile;
>
> destFile.Create (destFilePath, 'Sd2f');
> AudioFileID destID = destFile.GetAudioFileID();
>
> // Doing My Processing !!!!
>
> err = AudioFileClose(destID);
> checkStatus( err);
>
>
> The problem is that although I am creating the file as a
> 'Sd2f' file after
> I close the file, the operating system does not recognize
> this as a new
> SoundDesigner2 file !!!!
>
> The only way to save this as a SoundDesigner2 file is to add
> the extension
> at the end of the path name, like thus:
>
> char* destFilePath = "/Users/lachlanbarratt/Desktop/NewFile.sd2";
>
>
> Now, My Question is this:
> How can I save this file as a SoundDesigner2 file without adding the
> extension ?
>
> I would appreciate any answers to this problem. Thank you,
>
> Asher Vander Heiden.
>
> _________________________________________________________________
> Open an Online Savings Account today & collect a bonus $30*!
> http://clk.atdmt.com/1DG/go/hsb005000991dg/direct/01/
> _______________________________________________
> coreaudio-api mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/coreaudio-api
> Do not post admin requests to the list. They will be ignored.
>
>
>
_________________________________________________________________
Get a Credit Card - 60 sec online response:
http://ad.au.doubleclick.net/clk;8097459;9106288;b?http://www.anz.com/aus/promo/qantas5000ninemsn
[AU only]
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.