Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Radio PRO - MP3 and OGG-streaming solution

Discussion in 'Assets and Asset Store' started by Stefan-Laubenberger, Jun 18, 2015.

  1. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi

    We have fixed this problem in the upcoming version.
    Please send me your invoice via email to assist you further.


    So long,
    Stefan
     
    mkurnadi likes this.
  2. mkurnadi

    mkurnadi

    Joined:
    Jan 29, 2016
    Posts:
    6
  3. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    I answered already :)
     
  4. mkurnadi

    mkurnadi

    Joined:
    Jan 29, 2016
    Posts:
    6
    Dear @Stefan-Laubenberger , Thanks for your great help and support. I am wondering if Crosstales Radio supports mobile application in IOS, especially to have the audio player runs in the background. I believe the application with the audio should be able to be controlled via IOS "Control Center" Dashboard to pass Apple Approval Program.
     
  5. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    I wrote you an email :)
     
  6. pablouwall

    pablouwall

    Joined:
    Apr 20, 2015
    Posts:
    18
  7. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi

    Thank you for buying "Radio"!
    I'm not exactly sure where you struggle. Did you try to create a new file (e.g. "MyRadios.txt") and added entries like in chapter 5.1:
    https://www.crosstales.com/media/data/assets/radio/Radio-doc.pdf

    After you did that, add a "RadioProviderUser"-prefab to the scene an add this file to "Resource".
    Then set it up as you like. "Radio" is extremely flexible, so please take a look at chapter 4.1 in the documentation above.

    If you have further questions, just ask.


    Cheers
    Stefan
     
  8. pablouwall

    pablouwall

    Joined:
    Apr 20, 2015
    Posts:
    18
    Hi thanks for reply ,i’m Ok now. Is it possible to add a image to the radio sélection?
    And im curious about your Pls ou m3u importer.
     
  9. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    You can add an icon per station:
    Capture01.PNG

    But this is only for stations you prepared inside Unity. You can't use it right now with the txt-files. We have planned a feature for icon-URLs in the future.


    About M3U/PLS: as you probably know, you can already import those files into the providers. Now, you can save them too:
    Capture.PNG

    I think this is pretty cool :)
     
  10. pablouwall

    pablouwall

    Joined:
    Apr 20, 2015
    Posts:
    18
    Hi How can iput some pictures when a radio station is selecting
     
  11. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi

    Every station has an "Icon" variable:
    upload_2018-4-21_15-0-7.png

    You can use this for your purpose.


    Cheers
    Stefan
     
  12. pablouwall

    pablouwall

    Joined:
    Apr 20, 2015
    Posts:
    18
    one more time evrything is all right with your asset thanks.
     
    Stefan-Laubenberger likes this.
  13. AFrisby

    AFrisby

    Joined:
    Apr 14, 2010
    Posts:
    223
    Hi @Stefan-Laubenberger - the version on the asset store when fetching from 2018.2 and 2017.2 is returning 2.6.1 - how do I get a copy of 2.7.1 or newer?
     
  14. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi

    This is an issue with Unity...
    But you can send me your invoice and I will deliver you the latest version.


    So long,
    Stefan


    P.S: the current version is 2.9.7a ;)
     
    Last edited: Apr 26, 2018
  15. AFrisby

    AFrisby

    Joined:
    Apr 14, 2010
    Posts:
    223
    Thanks will do.
     
  16. gvergidis

    gvergidis

    Joined:
    Apr 5, 2018
    Posts:
    11
    Hello guys. First of all lets say that this is an amazing plungin! I have bought this plugin from my other account. I just wanted to ask, is there anything we can do for this error :
    Code (CSharp):
    1. Got a frame at sample rate 32000, in an MP3 with sample rate 48000. Mp3FileReader does not support sample rate changes.
    Thank you in advance.
     
  17. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi

    I'm assuming you are using "Radio" as a music streamer for Internet stations, this indicates an unsound MP3 encoding. Most of the times, this is due to the fact that the stations has some encoding problems...
    However, you could try it with the alternative MP3 codec in "Radio" - just download the attached script and add it to your scene.

    Please let me know if it helps.


    So long,
    Stefan
     

    Attached Files:

  18. gvergidis

    gvergidis

    Joined:
    Apr 5, 2018
    Posts:
    11
    Thank you very much for the instant support. I will give it a try and I will inform you!
     
  19. gvergidis

    gvergidis

    Joined:
    Apr 5, 2018
    Posts:
    11
    This is for windows. I am getting this error on Android. Which AudioCodec is the best?

    Thank you in advance.
     
  20. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    The error must be from Windows... Only there does Radio use NAudio as codec.
    However, NAudio is better than NLayer, but it depends on the stream and NAudio only works for Windows.
     
  21. mjenny82

    mjenny82

    Joined:
    Feb 16, 2014
    Posts:
    14
    I bought this asset and it works like a charm. But it am afraid to use it in my worldwide available commercial game, because of copyright laws. As the documentation suggested, I contacted soma.fm and 1.fm for their permission to include the radio stations. Here is what soma.fm replied:

    Unfortunately, we can't allow that; our music licensing agreements make this not possible.

    Thank you for asking.


    So it seems like the asset is pretty much useless to use in a commercial game, unless you are willing to run into legal issues.
     
    Ignacii likes this.
  22. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi

    Hmm, I don't quite understand their stance... This would drive possible subscribers to their service - given that you mention the origin of your sound in the UI, like "SomaFM - <station> - <Title>" and provide a link to their homepage or something similar.
    Assuming your app is a success, donating some real money on their service would probably help them. ;)

    However, all those streams are accessible through different players (like VLC etc.) and publicable reachable!
    Our impression is that those stations want to reach as many listeners as possible and your app could provide them with the urgently needed (donating) customers, Their competitors (like Youtube, Spotify etc.) are very strong - this is THEIR CHANCE to gain new listeners!

    You could also provide your own station with your own music or public domain audio (e.g. via IceCast), so this asset is FAR from useless!


    Cheers
    Stefan
     
  23. mjenny82

    mjenny82

    Joined:
    Feb 16, 2014
    Posts:
    14
    Hi Stefan, thanks for your answer.

    I did send soma.fm a screenshot of my ingame radio player that clearly shows their name, url and additional information while the user is playing the game. I also mentioned in the email that it benefits them, as new users will get to know soma.fm. But still they do not give permission.

    Please don't get me wrong, of course your asset isn't useless. As I said, it's a good asset. But I think it's a complete overkill if everyone that buys this asset has to write on his own to the radio stations to get a permission. It would be much better if you could do this once and then include only the stations that gave the permission to do so.
     
  24. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    I understand your point and we will see what we can do in the future to improve the situation for everybody.

    So long,
    Stefan
     
  25. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    214
    @mjenny82 when you contacted the radio stations did you make it clear that your game would act as a streaming client and you would not store the audio locally? Assuming the radio stations do stream legally, I doubt any agreement would include a list of authorised clients but will state it is just for streaming only.
     
    Stefan-Laubenberger likes this.
  26. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    This is exactly our stance! Radio is the same as every other streaming client, like VLC etc.
    Imho, those stations should be grateful for the (much) bigger audience ;)
     
  27. Yuuki-Mochiduki

    Yuuki-Mochiduki

    Joined:
    Nov 29, 2012
    Posts:
    11
    @Stefan-Laubenberger Thank you for your great asset!

    I purchased this asset, and i'm using it for my mobile app.
    When using it on mobile device, I often encounter errors below.

    [Android]
    No more data to read after 0:01! Please restart this station or choose another one.

    [iOS]
    Could not read url after 0:00!
    System.Net.WebException: Error: ConnectionFailure (Network is unreachable) ---> System.Net.Sockets.SocketException: Network is unreachable


    What is the cause?
    Do you know workaround about this?
     
  28. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi Yuuki

    This normally happens if you encounter a buffer under run. The most common case is that you lost your Internet connection or it can't provide enough download speed to stream the station.

    There are some options:
    1. Experiment with the Buffer Size. Try it with higher values an increment them by 16 until a maximum of 128. Start with 80.
    2. If you still got drop outs, try to change the Chunk Size by decrement it by 4 until a minimum of 4. Start with 12.
    3. Use our tool OnlineCheck to know the network status and allow the user feedback (like "Currently no Internet connection available, can't stream the station").
    upload_2018-7-13_10-52-59.png

    Please let me know if it helps.


    So long,
    Stefan
     
  29. mjenny82

    mjenny82

    Joined:
    Feb 16, 2014
    Posts:
    14
    I think I made it clear, but I don't know if I made it clear enough. I wrote that my game will stream their radio and I sent a screenshot showing my player, so I think they should have understood it correctly. But you know what, I am going to write another email to soma.fm, then we will understand their point better. I keep you informed about their reply, stay tuned.
     
  30. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    That's the spirit! ;)

    Lay out your and their incentives from participating as streaming partner in your game.
    They can gain many new subscribers - as I said before, the sad thing is, that soma.fm like all others are struggling against "bigger forces". They aren't dead yet, but are in urgent need of CPR. This is where "Radio" and our customers creations are kicking-in.

    WE LOVE BIG AND SMALL INTERNET STATIONS!

    This is our main goal with this asset - to support and give them a platform for thousands of listeners. Go to Shoutcast or any other service and take a look at the current listeners. Even big stations barley exceed 1000 simultaneous listeners... Now lets assume you create the next GTA like that -> BANG, millions of listeners! :)

    And as I said before: please support the station(s) by spending some of your revenue to keep them alive!


    Edit:
    As we explained in chapter 10 of the documentation, Radio receives PUBLIC REACHABLE radio stations. If they don't restrict the access (e.g. with authentication), they want to be heard. That's our stance: Radio is like a real, old-school FM-receiver.
     
    Last edited: Jul 15, 2018
  31. mjenny82

    mjenny82

    Joined:
    Feb 16, 2014
    Posts:
    14
    Haha, yeah, that's the spirit :) but I still think you Stefan should write to the stations, not because I'm lazy, but because you find the much better words than I do to convince them ;)
     
    Stefan-Laubenberger likes this.
  32. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    I will see what I can do, but I can't promise anything.
     
  33. mjenny82

    mjenny82

    Joined:
    Feb 16, 2014
    Posts:
    14
    @Stefan-Laubenberger @blacksun666

    Bad news from soma.fm:

     
  34. snorkpants

    snorkpants

    Joined:
    Mar 3, 2015
    Posts:
    3
    Hi,
    I purchased your radio asset (not pro) and I'm trying to find out how to keep the sound running on Android when the app loses focus.

    I've looked through the documentation but not found a solution as yet. Is there a simple method to achieve this?
     
  35. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi there

    There is a manual inside the "Documentation" called "Running Radio in the Background.pdf".
    I hope this helps, please let me know.


    Cheers
    Stefan
     
  36. snorkpants

    snorkpants

    Joined:
    Mar 3, 2015
    Posts:
    3
    Thanks. That worked a treat :D

    Do you have any idea why Unity doesn't have a method to achieve this without the need for the convoluted process of exporting then "hacking" the resultant files?

    It's working as I want which is the main thing so thank you for an excellent asset. Worth every penny :)

    regards,

    Graham.
     
    Stefan-Laubenberger likes this.
  37. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Unity doesn't do that per default because all games would still run in the background and drain the energy of the battery...

    Btw, make sure you are using our "BackgroundController" (Unity 2017+) to disable all unnecessary Unity objects in the background (cameras, models, lights, ui etc.):
    upload_2018-8-8_10-2-5.png

    We're always pleased about a good rating/review ;)
     
  38. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Important notice for all "standard" customers:

    We constantly try to push our assets to the next level by adding new features and deliver the best support for our customers. In the past we've kept updating the asset in a 2-month cycle. However, after careful consideration, we feel like this needs to happen at a faster pace. We've received numerous input from the community that a faster pace would help out a lot. Because Unity is ever evolving and we want to keep our assets relevant we need to be able to keep up the fast pace that is Unity's second nature. Packaging and maintaining a separate DLL-version poses a problem in regards to this goal.

    With this in mind, we decided to phase out the DLL-version by the end of August 2018.
    Besides being able to update the asset more often, we are convinced that phasing out the DLL-version in favor of the PRO version will also bring these improvements for our customers:
    1. More functionalities and supported platforms due the source code (e.g. Linux)
    2. Less frictions with different Unity versions within the same company
    3. Fast hotfixes and high priority support

    We understand that this may impact you negatively. However we hope with the upgrade-path we offer to you - our loyal DLL-customers - can alleviate your concerns and win you over once more:
    PRO edition

    Please rest assured we will continue to support and improve the PRO version over the years to come.

    I hope you understand our decision.


    Cheers
    Stefan
     
    twobob likes this.
  39. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Update regarding the deprecation of the standard package:

    The standard package is planned to be available (but no longer maintained) until December 2018. This will allow the transition to PRO with a 50% reduced upgrade-price for our existing customers.
    Afterwards, the package will vanish from the store and the upgrade path will become inaccessible.


    Edit:
    We managed to create an upgrade path for the standard version which will last forever.
    Therefore, customers of the DLL version can still upgrade to PRO for 50% of the full price.
     
    Last edited: Jan 22, 2019
    twobob likes this.
  40. momo_the_monster

    momo_the_monster

    Joined:
    Sep 3, 2014
    Posts:
    16
    Just downloaded and imported version 2018.4.0 into a project in Unity 2018.2.11f1.
    I can't compile and run - I get the following error in the console:

    Code (CSharp):
    1. Assets/_Vendor/crosstales/Common/Scripts/Util/SpectrumVisualizer.cs(13,16): error CS0246: The type or namespace name `FFTAnalyzer' could not be found. Are you missing an assembly reference?
    If I comment out/remove the SpectrumVisualizer script then I get the following errors:
    Code (CSharp):
    1. Assets/_Vendor/crosstales/Common/Editor/Task/BaseCompileDefines.cs(38,25): error CS0122: `UnityEditor.DebugUtils' is inaccessible due to its protection level
    Code (CSharp):
    1. Assets/_Vendor/crosstales/Common/Editor/Task/BaseCompileDefines.cs(38,36): error CS0117: `UnityEditor.DebugUtils' does not contain a definition for `Log'
    Any idea what could be wrong?
     
  41. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi

    Can you please delete the folder "Assets/_Vendor/crosstales/" and import it again? Please keep it in the original folder for now (Assets/Plugins/crosstales/) and try to build again.

    Does it work?


    So long,
    Stefan
     
  42. momo_the_monster

    momo_the_monster

    Joined:
    Sep 3, 2014
    Posts:
    16
    Thanks for the reply, Stefan - I get the same error after importing Radio Pro into a new, empty project and into its default place:
    Code (CSharp):
    1. Assets/Plugins/crosstales/Common/Scripts/Util/SpectrumVisualizer.cs(13,16): error CS0246: The type or namespace name `FFTAnalyzer' could not be found. Are you missing an assembly reference?
    the FFTAnalyzer.cs file in `Assets\Plugins\crosstales\Common\Scripts\Util` is a 0kb empty file after import.

    I can get Radio Pro to finish compiling and loading if I delete SpectrumVisualizer and comment out line 38 in BaseCompileDefines.cs:
    Code (CSharp):
    1.    DebugUtils.Log("Playersettings: " + ex);
     
  43. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hello again

    It's strange, but it seems the package is somehow incomplete :(
    FFTAnalyzer should not be empty!

    The second part from "BaseCompileDefines" is our fault, but I'm still a bit confused how it worked on all our different Unity versions...

    I apologize for the problems it caused! If you like, you can send me the invoice and I can give you the fixed version for the upcoming release of 2018.4.1.
     
  44. Nekotika

    Nekotika

    Joined:
    Jan 31, 2014
    Posts:
    17
    I have the exact same error, after importing it to Unity 2018.2 the FFTAnalyzer.cs file is empty.
     
  45. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Please send me the invoice and I can give you the fixed version for the upcoming release 2018.4.1.
     
  46. DigitalBeach

    DigitalBeach

    Joined:
    Jan 17, 2015
    Posts:
    37
  47. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Hi

    What is your target platform?


    So long,
    Stefan
     
  48. DigitalBeach

    DigitalBeach

    Joined:
    Jan 17, 2015
    Posts:
    37
    Android / iOS
     
  49. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,976
    Unfortunately, there is afaik no way to accomplish this with C#. There is a small possibility for AAC under Windows, but no other platforms :(

    Either you can convince the station to broadcast in MP3/OGG or you have to roll your own (native) implementation.
     
  50. shubhank008

    shubhank008

    Joined:
    Apr 3, 2014
    Posts:
    107
    This was/is playing in your demo so I purchased the asset, but now when testing in Unity itself it gives the below error.

    Stream: http://143.95.89.54:9318/
    http://143.95.89.54:9318/listen.pls
    http://143.95.89.54:9318/stream

    error:
    radio roc
    No more data to read after 0:00! Please restart this station or choose another one.

    I tried playing with buffer and chunk size to no avail, there was a buffer chunk combination that gave some other error related to authorization, even though no authorization mechanism is setup.

    Trying in Android mode.