Ideal Way to Save Audio Data in Objective-C - objective-c

I'm downloading and saving audio files from a URL. I'm trying to ensure that I'm properly implementing my variables and am storing the files themselves properly.
Is there an ideal or standard way of declaring variables to receive audio data or storing these downloaded files? I'm planning on just using NSURLRequest and NSURLConnection to download and save the files to the file system. Maybe reference them using CoreData. Is this a fairly standard way of going about this, or should I change my approach?

I don't believe there is anything special that you need to do for downloading audio files. I have myself downloaded and saved video and PDF files before, both in the same and usual way and didn't have any issues.
For reference you can check this question out: How to download audio/video files from internet and store in iPhone app? It has a very nice detailed answer.
Hope this helps.

Related

Stripping a pdf file from videos

I have a huge pdf file (152M) containing embedded videos. I reckon most of its size must come from the videos themselves. I want to make a lighter version out of it so that it's easier to share and send around, so I would like to remove the videos.
Is there a simple way to do it? In particular, using free tools? Possibly a one-off solution without needing to remove the files one by one?
I thought of using imagemagick for it, but I can't find how and I'm not even sure it's possible
Well, I could not find a way to do it. However, my original problem involved a pdf exported from a pptx presentation, so I managed to remove the videos from the presentation.
This does not answer the presentation, but I had opened a parallel question on askubuntu.com, I'll put the link here if anybody is interested: https://askubuntu.com/questions/1453755/stripping-a-pptx-presentation-from-videos-in-libreoffice-impress/

Current way to download large files in rails

I used to use the method outlined by Obie Fernandez to download files:
http://www.therailsway.com/2009/2/22/file-downloads-done-right/
But this way is a bit outdated so curious what is better? My fear is if you have multiple clients downloading large files too much memory would be eaten up.
I need to camo the S3 url and control who can download what. Perhaps this method is still fine or maybe streaming is the way to go.
Thanks in advance.

Transcoding Audio on iOS

I'm grabbing song data from the iOS music library (as an NSData object), but when the data is not that of an MP3 file, I'd like to transcode it.
I have two questions about the transcoding process:
Is there something built in to do, say M4A to MP3 transcoding, or will I have to use something like ffmpeg or other external libraries? If the latter, are there any examples of doing this on iOS knocking about?
What's the best way to do this that doesn't load everything into memory? Obviously a large song file will exhaust the memory and the app will be terminated.
maybe libSOX fits to your needs.
the features of the tool are available [here][2]
to compile for iOS, check out the thread building libsox for iOS question
[2]: http://sox.sourceforge.net/Docs/Features "here"
i think ffmpeg is the choice
for iOS http://code.google.com/p/ffmpeg4iphone/
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-October/076618.html
http://fobs.sourceforge.net/ is another choice (C++ wrapper to FFMPEG). Its home page has a reference to m4a files. To use it you could wrap up C++ in Objective-C in a .mm file.
How about LAME + libsndfile?
See:
http://lame.cvs.sourceforge.net/viewvc/lame/lame/doc/html/index.html
http://www.mega-nerd.com/libsndfile/

How do you read/write/update m4u and mp3 file meta data using cocoa/objective c?

Are there some particular library files available on OS/X that are relevant, I am just not sure where to start.
You'd probably want to use the QuickTime for that. There is some sample code that does this. However, it's not the nicest way to access metadata. The newer QTKit Framework somehow still requires you to fall back to the C-based APIs. There is another example from Apple embedding meta data writing into a Objective-C method. This might be the best starting point for you.

Adobe Air file avoid opening

After creating an adobe air file, I am able to open it using winrar or any other archiving program and see all the contents including the code of my program.
Is there a way to avoid this? Some sort of encryption or something?
Thank you very much.
No. The '.air' file is as much an archive as say. a XPS file.
The question is why do you want such a thing? To avoid source sharing?
If you have issues sharing your source, why don't you use put javascript code on your server and pull them from client side. Of course, this'll mean that they don't work when their network or your server is down.