Announcement

Collapse
No announcement yet.

Custom Music Player

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    I've been looking around for a music player, if anyone knows of one that's pretty much plug and play then please let me know. Ideally it would have a ui, I'm happy to reskin it and make it pretty but the functionality needs to be there.

    Leave a comment:


  • replied
    I'm happy to use .ogg files for the meantime if that's all that is available. I'm surprised that no-one has made a music player module that can be sold on the UE4 Marketplace. If one existed I'd buy it in a heartbeat. I'd like to make my own, but I'm more artist than programmer and the whole thing mystifies me unfortunately. :/

    Leave a comment:


  • replied
    Originally posted by Bushey View Post
    Is anyone able to advise me on the best way of loading wav or mp3 files during runtime. I'm working on an app that amongst other things would allow users to play their own music during the game.

    Any help with Blueprints or ideas of how this could be achieved would be appreciated :0

    Cheers!
    Wait for next year - the patent on some MP3 stuff expires next year so there's no legal consequence to compressors and decompressors using the format, as I understand it. We'll probably see a few plugins offering streaming mp3 support then.

    Leave a comment:


  • replied
    Originally posted by Bushey View Post
    Is anyone able to advise me on the best way of loading wav or mp3 files during runtime. I'm working on an app that amongst other things would allow users to play their own music during the game.

    Any help with Blueprints or ideas of how this could be achieved would be appreciated :0

    Cheers!
    This is what i need exactly

    Leave a comment:


  • replied
    Is anyone able to advise me on the best way of loading wav or mp3 files during runtime. I'm working on an app that amongst other things would allow users to play their own music during the game.

    Any help with Blueprints or ideas of how this could be achieved would be appreciated :0

    Cheers!

    Leave a comment:


  • replied
    I was able to run a server running the editor that could import wav files and convert to uassets which the game could read. This whole process is horrible and in the end I may not use it (running the editor requires an expensive server).

    Non uasset code support is not consistent across the platforms.

    If this situation changes I'm very interested, but I sank a fair amount of time into this hit lots of brick walls.

    IF there was a standalone tool like unrealpak that could do the convertion without GPU requirement then the cost of running a conversion server would drop significantly.

    The ideal would be native cross platform support for loading wav files, just like you can load standard image formats.

    Leave a comment:


  • replied
    Originally posted by Bushey View Post
    Hi [MENTION=10459]keru[/MENTION], is it possible to play an .mp3 or wav file using your code as well?
    Last time I tried, no.
    Please refer to the previous comment from Tom to enable other encoding support.
    Originally posted by theonecalledtom View Post
    Looks like OGG loading support is desktop only (WITH_OGGVORBIS depends on PLATFORM_DESKTOP).

    Following this other thread here I have WAV files loading on PC and MAC but not iPhone. No errors just no WAV playing. Still need to debug this further - could be something simple like endianness of data - but thought I'd post here and see what the latest thoughts were on cross platform raw audio loading in game.

    Leave a comment:


  • replied
    Hi [MENTION=10459]keru[/MENTION], is it possible to play an .mp3 or wav file using your code as well?

    Cheers!

    Leave a comment:


  • replied
    so amazing

    Leave a comment:


  • replied
    Apologies for pulling back and old thread - information on this subject is thin on the ground so it seems as good a place as any.

    Looks like OGG loading support is desktop only (WITH_OGGVORBIS depends on PLATFORM_DESKTOP).

    Following this other thread here I have WAV files loading on PC and MAC but not iPhone. No errors just no WAV playing. Still need to debug this further - could be something simple like endianness of data - but thought I'd post here and see what the latest thoughts were on cross platform raw audio loading in game.

    Test case I'm working towards is user generated content, where I don't expect the user to have unreal editor installed - eventually they might be editing data through a simple web interface.

    Any shortcuts on my voyage of discovery gratefully received!

    -Tom

    Leave a comment:


  • replied
    This actually came up on Answerhub the other day: https://answers.unrealengine.com/que...ing-focus.html

    Leave a comment:


  • replied
    Sorry for the delay

    I got it work. Here's my code. With this actor I can play an arbitrary OggVorbis file from hard disk.
    I used trigger boxes and lights for testing purpose, if you're not interested you can obviously remove all those stuff.
    MusicPlayerActor.h
    MusicPlayerActor.cpp
    Many thanks to mgriffin_pitbull

    Originally posted by Demolition Man View Post
    Is there a way to access the various media players from within Unreal Engine 4? What I would like to be able to do is play a tune or playlist from windows media players where I control it from within the engine.
    AFAIK there's no way to automatically detect and control other media players.
    If you _really_ want to do this...you should look for every known media player files in the user's hard disk, for each one of your target operating systems or devices. Then for each result you should find out media player API and implement a wrapper for Unreal Engine.
    An easier way can be using libvlc [see previous comments above]. Essentially you embed Video LAN Client core libraries in your game and you can be sure that libvlc / libvlccore API can be used on your target platform. I suggest VLC because it is open source and (one of) the most well documented media player you can find.
    Otherwise you can extend this simple music player in order to support playlists (I'd also like to do so but I'm currently working on other projects and I'm not sure I can have results in short time) and other file formats (decoder needed).

    I have noticed a not-so-funny-feature (aka bug) in my code: when I run my exported .exe game in windowed mode and I bring the focus out of the game (ie Alt + Tab to focus other programs) the sound is muted. The song goes ahead in play but is muted till I bring back the focus in the game (ie click in the game window). Is there a way to keep the music on also when the game is not focused?

    Leave a comment:


  • replied
    Is there a way to access the various media players from within Unreal Engine 4? What I would like to be able to do is play a tune or playlist from windows media players where I control it from within the engine.

    Leave a comment:


  • replied
    Originally posted by Marc Audy View Post
    It should also be noted that the procedural audio paths are currently only implemented for XAudio (PC/XBoxOne) and Core (Mac) audio devices, however, that will be rectified at some point.
    hello, my first post on ue4 forums
    whats the word on this?

    ive been looking for an excuse to mess with ue4, 3 ios apps made with udk are waiting review so downloading ue4 source sounded like a good idea.
    GeneratePCMData was one of the first things i thought about messing with, basically with an aim of producing sound with maths on the fly.

    any use me trying just yet to make it work on a pc?

    edit:
    just seen GetVoiceData in VoiceCaptureWindows
    could this be a way in?
    Last edited by tegleg; 06-26-2014, 08:04 PM.

    Leave a comment:


  • replied
    Yeah, getting from an Audio Component to the sound source could be a bit difficult so that's why I wasn't sure whether to recommend it. You can use FAudioDevice::FindActiveSound to get the FActiveSound associated with the audio component while it's playing. Then you'd have to use the map of FWaveInstances the active sound has (should only be one when playing a sound wave) and use the Audio Devices WaveInstanceSourceMap to get the sound source associated with it. This is basically the process that occurs when you call Stop on an Audio Component if you follow the functions through so I don't think there's anything too hacky about this approach.

    I'm not sure what the todo comment relates to but I guess it's best to give this a try first and see if it throws up any more problems.

    Leave a comment:

Working...
X