open dialog with preview
open dialog with preview
- Subject: open dialog with preview
- From: Ed Friese <email@hidden>
- Date: Sat, 8 Mar 2003 23:37:16 -0800
Have any of you had any luck building an audio file open dialogue with
preview similar to what is found in Logic 5.5? I've been messing
around with one in an app I'm working on in my spare time and am having
trouble adding the display of the attributes of the selected audio file
(Logic displays the sample rate and length of the audio sample in the
file open dialog you get when you add an audio file to your song). I'm
trying to use NSOpenPanel, and finally succeeded in hacking in a bit of
code to allow me to get notified when the selected file changes.
Problem is, the NSOpenPanel filename method can't be called while the
panel is up. So, I use the NSBrowser 'path' method to get the filename
from the browser. Unfortunately, that path is a display-type path that
doesn't work with the AudioFile API (or FSRef, or anything that I can
find). The filename I get looks like "/Macintosh
HD/Users/efriese/...". I'm stuck, I guess for now I can just hack of
the "/Macintosh HD" part of the string off, but that can't be the
'right' way to deal with it, can it?
Anyway, I just thought I'd check this list for help since it's a common
type of dialog for audio developers to implement.
Thanks for the help,
Ed Friese
_______________________________________________
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.