Using Audio Unit (Mixer Host) to play from iPod library instead of pre selected sound files. - objective-c

For a university project i'm working on a DJ mixing app. I'm essentially tackling this project from a 'teach yourself from scratch by googling everything and analysing pre existing source code' type of way so go easy.
I have looked at the Mixer Host sample project from apple found here: http://developer.apple.com/library/ios/#samplecode/MixerHost/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010210
I can't work out how to replace the pre selected audio files (guitar + beat) with a song URL from the iPod library selected from a media picker, or, in this case - 2 media pickers.
Is it a case of grabbing the URL of the iPod library song selected and putting in place of the URL of the preselected audio file?
If someone could point me in the right direction, tell me how i'm completely going about this the wrong way, or even do the coding for me (joke), it would be greatly appreciated.

You can't actually simply stream from the ipod library; you need to copy the files into the documents directory of the app.
try this: http://www.subfurther.com/blog/2010/12/13/from-ipod-library-to-pcm-samples-in-far-fewer-steps-than-were-previously-necessary/

You can use third party libraries to play a iPod library songs using AudioUnit. The below link is useful to you
Clickhere!

Related

Video Trimming In Expo

Am developing an app which a user can upload a video status just like whatsapp but I need a video trimming library which I can use to implement this feature where a user can trim some portion of the video they selected with a time frame. I searched and found some libraries like react-native-video-processing and others but none seems to work with expo. so I will appreciate if someone can give me a working one or a guide on how I can use ffmpeg or other libraries to archive this.

How to play sound from resources using windows media player?

I am making a game, so at one point I need to play two sounds at once, so I played the first one using the "My.Computer.Audio.Play()" Method to load from resources.
As for the second, I used Windows Media Player to load the second sound In A SPECIFIC FOLDER, now I know it is possible to extract files to a folder and program it to play from there to avoid trouble, but I don't want them to be extracted.
So I'm trying to get the file path from resources and put it in WMP's URL, but couldn't get any result after searching the internet.
Am I missing something?
And if you know any better alternative, make sure it can:
1- Replay sound (coding with timer is ok),
2- Change Sound Position
You can use the MediaPlayer class in code or MediaElement in XAML for playing audio files in a WPF application. Check out the article WPF Media Player In VB.NET for code samples.

How to get the video file for a movie currently playing in browser?

So I have a youtube page open where I can watch a video.
But this video was taken down by the user. My open page still has the video, if you go to it again (refresh) the new page does not.
Since I have the video loaded in my browser tab (chrome), how can I go about finding the actual file and saving it?
In the old days of YouTube, it may have been possible to find the single video file on your harddrive and save it, but this is no longer the case. As explained in this Computerphile video, all YouTube videos are now split into tiny pieces and downloaded piece by piece.
You can observe this for yourself if you open up Chrome (or Firefox's) Dev Tools and watch the nnetwork tab. You'll see:
all of the pieces of the video loading bit by bit.
One additional thing you'll learn from the Network tab is that the videos are downloaded as octet streams, so you won't be able to find the links to the pieces hidden in the DOM.
One thing you migth try is, in the Network tab, clear the results and then move the cursor to the beginning of the video. You should see the streams come up again. Right click on the path name and then do a "save as", and save it as 0000.mp4 (or whatever), for all the pieces. You should be able to reassemble these pieces in any video editing software. I tested this by getting two pieces from a random YouTube video.
I couldn't find anything that doesn't require a restart (and hence reload) of Chrome.
One (kludgy) hack if possible, though, would be to run a screen video capture and play the video.
I have done this long back using IE6, i.e. fetch the file from the temporary files location and rename it to the extension flv.
The following links should point you in the right direction, but can't say it will work for sure, as I believe recent chrome versions seem to have a defensive cache implementation.
Ubuntu Forum solutions
You might need to tweak the above for your use.
Run a screen recording/capture program such as:
Screenr
CamStudio
Then edit out the youtube bar if its visible.
The buffered video is cached at the following location:
C:\Users\<user name>\AppData\Local\Temp\flaxxxx.tmp
Note you have to change to whatever user you are using, and xxxx is a random number. Also, the .tmp file might be hidden, so make sure your windows explorer is displaying the hidden files.
While the tab is open, you won't be able to copy the file, but if you close it, the file will be automatically deleted. For doing so, download HoboCopy, extract it and after that, run cmd as administrator. Change the directory on the console to the directory where you have extracted HoboCopy and type the following command:
hobocopy C:\users\<user name>\Appdata\Local\Temp C:\videos fla1234.tmp
<user name> - replace with your windows username
C:\videos - the directory where you want the video to be copied to
fla1234.tmp - the name of the file to be copied.
Wait for the copy to be done and then you can rename the destination file, changing '.tmp' to '.flv'. This file can be played with any FLV supporting media player.
i find this software to get the video from temp files folder and play it http://www.nirsoft.net/utils/video_cache_view.html
Video file is cached, therefore suggested ways can help you to save the file. But if you deal with same problems I offer using IDM(Internet Download Manager). After installation of this application for every online video stream (e.g. all flv files in youtube) IDM brings a small picture that you can click on it and downloading will be started automatically without need of any configuration.
You have to install a browser extension to download YouTube videos. You won't find a simple URL for an mp4 file in the HTML source. Try googling "youtube downloader" + your browser name.
As far as I recall, YouTube videos are not served as a continuous HTTP resource, but instead divided into small chunks and assembled client-side by the Flash player. This is why you can jump into the middle of a video, without having to buffer the first half of the video.
Generally speaking, YouTube don't want you to rip their content, so they aren't exactly making it easy for downloaders.

How do access native APIs with Sencha Touch?

If I wanted to create a mobile app that allows the user to take pictures with their phone, record audio notes and record video, how would I do that?
I was browsing through the Sencha Touch 2 API and while I see documentation on video and audio files, it seems like it is just providing a way for me to access files stored on the phone - not actual triggers to record, or take pictures.
Am I missing something?
How would I do what I want?
In order for Sencha Touch to have access to your phone capabilities, you need to use a product like Phone Gap
Unless there is a HTML5 api for doing those sorts of things I don't think you can do that. I know on PhoneGap there are native extensions added into that platform for access to things like microphone, camera, etc. I don't know if Sencha Touch has added any of those sorts of extensions in order for you do this.
Just thinking out of the box here, but you might be able to put Sencha javascript into a Web View from within an Android Java process. Then the Java code could expose an object in its process as an extension point to the Javascript engine for access to Camera, Microphone, what not.

Displaying image on Scroll View

I am developing an iPhone application where i want to display three image in each row on scroll view where i need to click action on each image like Photo album in iPhone. I am not getting any sample code.
Hoping for help
subodh
There's plenty of sample code out there, I found this after only basic googling. You want to search for "UIImageView Iphone". It's also worth mentioning that Apple's very own Developer Center is extremely well written, and will teach you everything you need to know about iPhone programming.
Generally it is frowned down upon to say to look more or read documentation, but you really haven't looked at all. Especially because of Apple's own resource that tells you how to do almost anything, especially something like this. It's not something you can pick up and bits and pieces of and expect to be successful with, it really should be learned starting from the beginning and moving forward. This is especially true if you've never programmed before or are unfamiliar with C/Objective-C.
Three20 has a photo browser that is open source and works similarly to the iPhone's photo browser with some nice code examples. The images come from an image source object that can relate them to images in your apps bundle or images on the web. Looks like its Google group is here. I think that to use images in your bundle you use a URL formed like: bundle://image-name.png and not the typical use of the main bundle to get a path to resource.