• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to search for mop3 files, retrieve those file and play these file into apps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to search for mop3 files, retrieve those file and play these file into apps


  • Subject: Re: How to search for mop3 files, retrieve those file and play these file into apps
  • From: Graham Cox <email@hidden>
  • Date: Thu, 5 Mar 2009 20:49:53 +1100


On 05/03/2009, at 8:41 PM, haresh vavdiya wrote:

           I  am developing one application in which user can retrieve
music file from machine and use can play this music file also.

So i have to search for ".mp3" files in all folders and then
display into table. Can anyone tell me that how can i search, retrieve .mp3
file and play this particular file into my apps.


Briefly, scan the disk using NSFileManager. You can use - enumeratorAtPath: to get an NSDirectoryEnumerator that will perform the scan. Gather the results into some sort of data storage that suits the purpose - a simple array would probably do, such as NSMutableArray.

To display the results in a table, NSTableView hooked to a controller e.g. NSArrayController that uses the above array as its data model.

To play an mp3 file, the simplest way is to use Quicktime via QTKit. e.g. [QTMovie movieWithURL:error:] followed by [myMovie play];

--Graham






_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to search for mop3 files, retrieve those file and play these file into apps
      • From: rajesh <email@hidden>
References: 
 >How to search for mop3 files, retrieve those file and play these file into apps (From: haresh vavdiya <email@hidden>)

  • Prev by Date: How to search for mop3 files, retrieve those file and play these file into apps
  • Next by Date: Re: How to search for mop3 files, retrieve those file and play these file into apps
  • Previous by thread: How to search for mop3 files, retrieve those file and play these file into apps
  • Next by thread: Re: How to search for mop3 files, retrieve those file and play these file into apps
  • Index(es):
    • Date
    • Thread