Re: OS X NSPasteBoard and Wave data
Re: OS X NSPasteBoard and Wave data
- Subject: Re: OS X NSPasteBoard and Wave data
- From: Charles Constant <email@hidden>
- Date: Thu, 10 Apr 2014 09:57:51 -0700
Hi Kyle et al,
Thank you very much, Kyle, your email sorted me out. I changed my code to specify the Wave UTI from AVFoundation and pass in the bytes. Yay!
I didn't have Garageband installed, but I do now, and it also only passes PCM audio internally. It's still a bit disappointing that I have no third party apps with which I can test pasting. I'm happy with the code now though, because any apps out there which want to should be able to get my data. I made a tiny test app just to test, and it plays audio from pasteboard just fine:
NSPasteboard* pasteboard = [NSPasteboard generalPasteboard];
NSData * wavefile_bytes = [pasteboard dataForType:AVFileTypeWAVE];
NSSound *sound = [[NSSound alloc] initWithData:wavefile_bytes];
[sound play];
Beautiful, I can move on :)
Thanks again,
Charles
_______________________________________________
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