Audio file access

I'm trying to access a .wav file from my hard drive and have been unsuccessful. I have the following code:
String wav = "file:///c:/tada.wav";
Player p = Manager.createPlayer(wav);
When I run the application and click on the play button i get an error saying that it cannot connect to the file. but the code compiles fine. If I try to access a file that resides online it works fine. i.e. if I enter a url instead of file:///c:/tada.wav
Any suggestions on how I should solve this problem? Should I throw this file in the 'res' folder and try to access it from there....how would do that then?

Hi my friend,
below is my code I think it will help you, where res is just a directory under my directory classes. Have fun.
protected void startApp() {
try {
String type = "audio/x-wav";
InputStream sourceStream = getClass().getResourceAsStream("/res/audio/bark.wav");
Player player = Manager.createPlayer(sourceStream, type);
player.start();
}

Similar Messages

  • I'm running logic pro 8.0.2 on Leopard 10.5.8. I've recorded an evening of live music, the cut the recording into songs using one audio file folder. When working on an individual song, I can't access the sampler.  I get the message "nothing to display"

    I'm running logic pro 8.0.2 on Leopard 10.5.8. I've recorded an evening of live music, then cut the recording into songs using one audio file folder ad multiple song files. When working on an individual song, I can't access the sampler.  I get the message "nothing to display" or "no region or audio file selected"  After much research on the web, I believe this is a permanent bug.  Does anyone have a good work-around for this type of work.  We record live 16T band rehearsals constantly and would love to be able to break individual songs out of the large file and be able to use the sampler.  Thanks in advance for your ideas!  Cheers.

    Another thing - if I copy one of the tracks to another track, then the sample editor works on the copied track.  I don't want to have to copy 16 tracks to new tracks to be able to use the sample editor on a project.  Thanks again.

  • Accessing audio file directories more easily

    Is there a way to access audio files like foley or music files more easily. Currently I locate files in the finder and drag into the FCP browser window, but would like to have a way to see the various folders in one place. Is this doable, or is there a better way to do this?

    Meg The Dog wrote:
    Hi =
    At the finder level, just use QuickLook.
    Select the file. Press the spacebar. If is is an audio file it will play, an image it will display, or a movie it will play as well.
    You can use this to sample your files and preselect and screen those you want to drag into the FCP browser.
    MtD
    Thanks for the feedback. I had hoped there was a way FCP could allow adding folders like Motion's file browser. I know I can add the four or five folders (where I have audio content of interest) to the Finder's Places Sidebar, and sample the audio as you said, but hoped there was a way to do this from within FCP file browser, or access via a right mouse click. I am setting up a Macbook as a mobile editing station, so had hoped there was a way to view and select content without having another window (finder) up. It's less cumbersome of a process with a single monitor system.

  • New audio files receives error message from iTunes - You do not have enough access privileges for this operation.

    Every time a new audio file is downloaded onto my desktop, (or if I double click on a new audio file) iTunes no-longer will play them. It gives an error message stating: Attempting to copy to the disk "Mackintosh" failed. You do not have enough access privileges for this operations.
    Please can you help me to resolve this situaion. I confess that I am not very computer savvy.

    Launch iTunes on the computer.
    From the iTunes menu bar click Store > Authorize This Computer
    Make sure to sign in using the same Apple ID used on the iPhone.
    Then sync your iPhone.

  • Recording video/audio files using Flash Meida Server through rmtp, and allow users to access the recorded files through http.

    As titled, what is the way to record video/audio files using Flash Meida Server through rmtp, and allow users to access the recorded files through http?
    What I am trying to do, is to record a user's microphone's input and save it to the server. Afterwards, I would like other users to be able to access the recorded files and mainuplating the audio data, by computeSpectrum(), to do some visualization of the audio. As I know computeSpectrum() cannot work on streaming files, so I think I need to access the recorded files using http instead of rmtp. Is that true?
    How can I redirect the http request to the files I was recorded into my applications/appName folder? Or I need to somehow moved the recorded files to the /webroot folder?
    Thanks!

    I probably have asked a stupid question.
    My recorded streams are still saved in the applications/appName/streams folder.
    And I redirect the www.mydomain.com/streams to point to the applications/appName/streams folder.
    And the rmtp recorded streams are abled to connect through http now.

  • My music library is too large for my iPad.  If I use the cloud, will I still be able to access audio files or does it all end up having to be saved on my iPad?  In other words...am I limited to the space on my iPad memory?

    Do I still need to have enough space on my iPad for my whole music library?  Seems like I must be missing something...why would I want to be limited by the memory space on my mobile device?  Is there another way to share audio files between my computer and my iPad other than iTunes?

    It depends on whihch IPad you purchased. The 16GB, the 32GB, or the 64GB for storage.
    Tap Settings > General > About. You'll see Capacity in the list.
    How Mac OS X and iOS report storage capacity
    You get 5GB of free storage space with iCloud but you can purchase more if necessary.
    Apple - iCloud - Learn how to set up iCloud on all your devices
    If you setup an iCloud account, it won't be necessary to sync your iPad media with iTunes. Everything is synced via your Wi-Fi network with iCloud.
    If you do not want to use iCloud for storage and syncing, iTunes is the only software you can use to sync iTunes media with an iOS device.

  • Upgraded to 10.3.1.55, now can't set iT as default player,"An error occurred when updating the default player for audio files types.  You do not have enough access privileges for this operation." How to fix?

    After I upgraded iTunes, iTunes doesn't recognize CD in the drive, apparently isn't the default player.  It won't let me set iTunes as the default player, I get the error message "An error occurred when updating the default player for audio files types."  I tried Whitesides' remedy (changing Read Only status in folder in Windows) but it didn't solve the problem.  Any suggestions?  Thanks.
    J

    Oddly enough. I think I just solved it. It looks like, for some reason, my computer has about 8 different "iTunes music" folders, and I've been saving my music to the wrong one. Neat. Music now imports and plays as it should. Copying things over is going to be so fun tonight!

  • How can I see previously stored tunes no longer on my computer? Where are iCloud audio files?

    Maybe my question has an answer too "obvious" for me to see it.  But lately I've become aware of tunes that, for one reason or another, are not showing in my iMac's iTunes program. I went to System Preferences and clicked on "iCloud."  Immediately, I saw how to check iCloud for the following files and documents: Mail, Contacts, Calendar, Notes, Safari (not sure what this category could be for--seeing what was on the web at some prior point in history?), Photo Stream, Documents & Data, Back to My Mac, Find My Mac.
    In other words, going to iCloud appears to reveal categories for all of your iCloud content EXCEPT your music files.  I know about iTunes Match, and I think I like it, now that I've gotten used to a few of its quirks.  But certainly there are times when the owner of downloaded, commercial audio files (i.e. Tunes) will not have them on his computer.  And certainly there must be a way for me to see what I've previously stored in the Cloud--if only to remind myself of the music I've purchased and have available to me.
    I may be missing something about the whole iCloud concept.  Is there a way for me to see tunes I've previously stored in the iCloud but no longer have on my computer?  (I'm always careful not to delete tunes from my iTunes program unless I see 2 or more identical files appearing on my computer).
    Thanks for any directions to the iCloud musical holdings / archives--or clarification of any misunderstandings.
    Cap
    (I see that I'm currently running OS 10.8.2.  I have only 500 gigs of memory, and my music collection is so larg, I'm almost dependent on being able to access songs in the iCloud.  Next time, I'll certainly pony up for the largest memory Apple offers on an iMac.)

    They are not showing up in Lightroom at all. I already deleted them.
    When I try to import them again into Lightroom it wants to add another 2012 folder to wherever I am trying to insert them and then it does the month/day folder when it already has the month folder it should automatically go into and not be adding a seperate 2012 folder first.
    I can't even get it to do the above right now. Now all it does is it wants to make this seperate 2012 folder with the month/day folders but has little boxes beside each folder showing that there are no images to import. The images do show up on the import screen but they are all darkened and unchecked. When I click the proper folder to import them they come on bright and have little boxes checked, but that lasts for less than a second before it decides they are not new. They are new images, I deleted them all out of Lightroom, and probably missed deleting some through Lightroom but instead deleted them straight from the folder outside of Lightroom. This is what is probably causing me such grief and I have found nothing in my searches to tell me how to correct this. *sigh*

  • Error while updating default media player for audio files??

    Ever since I received a replacement iPod Nano for my original through the AppleCare program, I frequently get the following message while syncing podcasts:
    "An error occurred while updating the default player for audio file types. You do not have enough access privileges for this operation."
    How can I correct this problem?
    HP Pavilion zv6000   Windows XP   Athlon 64 Processor 4000+

    Check out this thread for a possible resolution to your problem: http://discussions.apple.com/message.jspa?messageID=6825681

  • Backing up iPad app audio files manually

    I am using a specific iPad app for work (Assess) that was designed to not sync or backup audio files that I create within the app.  The thing is, for multiple reasons, including the fact that my iPad Air has 10 GB of Other data and is in need of a fresh restore) I need to back up those files.  I've contacted the developer and they say they can't help and they designed it that way on purpose.  There have to be some third party apps out there that would let me see the files on my iPad and copy them, yes?  Suggestions?

    No suggestions and the Developer has the ability and right to maintain there files solely inside their application.
    If it is intentionally built that way, there is likely no good method of bypassing their security.
    All IOS apps only have access to their own storage and do not have the ability to reach into another apps space, This is part of what make the IOS so secure against malware.

  • Premiere Pro CC won't import ANY audio file, be it an mp3 or part of an mp4 video (or other formats)

    Any audio or video file I drop in to premiere will almost immediately pop up with the window
    Audio Conforming Error
    Error compiling movie.
    Unknown error.
    When I check the error/event log (little red X in the bottom corner) that window says:
    "11/21/14 09:47:28  A disk error occurred while attempting to access the following files:
    \\ipsse01\home$\myusername\AppData\Roaming\Adobe\Common\Media Cache Files\filename.mp3 44100.cfa"
    (The actual file is on my desktop)
    This happens with everything, even the stock audio files Windows comes with in the "Sample Music" folder, I tried those too to no avail.
    I'm at a complete loss. I'm new to premiere pro but these are generic file formats so I don't think the issue is with the file. I haven't tried to reinstall because I'd have to go to our one network administrator/IT person (who also is the accountant for the company) so she can enter the admin user name/password in the pop up box, and she's often so busy. I'm trying to avoid bugging her if I don't need to (which unfortunately I tend to still have to do a lot)
    For reference I'm running Win7 Professional 64-bit, 8GB RAM, and an i7-4610M CPU @ 3.00 GHz.

    Hi Neila,
    Neila@IPSUMM wrote:
    Thanks for responding, but I work for a very small company and since I'm the only one who needs CC, I have the personal version installed.
    Also this appears to be a blanket issue with all audio and video file formats, thus not likely a codec issue since the files I've tried so far should be covered by premiere's compatibility, the even play in windows media player with no issue.
    Video itself plays fine, but any audio attached to a video, or just plain audio files will not import no matter what I try.
    Sorry my info didn't help.
    Two things to try.
    Create a brand new project and test if you can import the problematic files.
    If that does not work, change the name of the folder that contains your media files. Then try to import.
    Let us know what happens.
    Thanks,
    Kevin

  • IMovie 08 - Problems referencing audio files.

    I have just finished creating a new movie in iMovie 08. The problem I am having is iMovie can't find the audio files I used as a soundtrack for the movie. These audio files are located in my iTunes library. The catch is that all of the music in my iTunes library is stored on another computer, so all of the music files are referenced.
    The problem began when I had to turn off the other computer for updates, while I still had iMovie open. Mistakenly I forgot to eject the other computer as it was connected as a server to my Mac. Of course iMovie can no longer find the audio files because they are offline.
    Well, when I turned the other computer back on and remounted it as a server, iMovie would no longer play the audio files in my movie. I can still access them through the music tab in iMovie, and they play perfectly.
    I have even restarted iMovie and my Mac multiple times.
    I really don't want to have to redo all of the music for my movie. If anyone can tell me how to "re-reference" audio files in iMovie, I would greatly appreciate it.
    Thanks!

    Try post on the iMovie forum is my best advice.
    Regards
    TD

  • How to listen to an audio file (that's not a podcast) in this app

    I have some foreign language learning audio files that I'd like to use the "back 15" button feature of this app. They're not part of a podcast. I haven't found another app that does has this "back 15 seconds" feature, so I'd like to play these files using the iOS Podcast App.
    I found a thread that said to use iTunes to change "media kind" of an mp3 to "podcast", but my drop-down just has "music", and following others suggestions to hold "shift" when pressing "Get Info" didn't change that to include other options unfortunately. It was also suggested in old posts that in this case the file permissions may be read only, but that's not the case with my file.
    Looking for how to play my files in Podcast App, or info on another app that has the "back 15" feature. Thanks!

    Duh... found my error... I was attempting to access the data by referencing the created "root" element.  Since <test> is the very first element tag, it's setup as the root element, which you don't need to reference.  Changing the alert to alert(xml.data); fixed it.
    Now I just feel dumb, lol...

  • Vista - how do you make iTunes the default player for audio files?

    Having started using iTunes on a new Vista PC, I've found that it defaults back to Windows Media as the default audio file player every time the machine is rebooted.
    But worse than that, I cannot find any option to make iTunes the default player for MP3 files - under the Vista settings, the ONLY option offered is Windows Media: there is not even a box to tick for iTunes.
    Have others found this? Is there any way around this?
    (I thought that Microsoft was legally precluded from making these kind of enforced settings now???)

    Although I now seem to have successfully made iTunes the default player for audio files, iTunes has started putting up this message:
    "The iTunes Music Library file cannot be saved. You do not have enough access privileges for this operation."
    A quick scan of the forum shows this problem has come up quite a few times, but I'm far from clear if there is a definitive answer/solution. I am the administrator for the computer. It sounds worrying that the Library file is not being saved - should I be worried?

  • Error: A Error Occured While Trying to Update The Default Audio File Type

    Whenever I do anything in the preferences, when I back out and close the prefs, I get this error:
    "An error occured while updating the default audio player for audio file types. You do not have enough access privileges for this operation"
    I do have Admin rights on my own computer. This happens with 6.0.4 which I just installed.

    user10163762 wrote:
    Thank you Eugen and Hussein.
    The problem is not with the template.
    It seems to be a problem in that particular instance.
    Uploaded it in a different instance.
    However once i run the program, i cannot view the output as the browser window flashes and disappears.
    My colleague says , it is to do with the trusted site to download something from the browser.
    Can you please guide me on how to fix this ?
    http://bit.ly/1k8e2vi
    Thanks,
    Hussein

Maybe you are looking for