Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Ambrose998800 · Jan 02, 2017 at 08:50 AM · errorfmod

Error: Cannot create FMOD

While loading sounds from a certain folder, I always get the error message:

 Error: Cannot create FMOD::Sound instance for resource "qB, (Operation could not be performed because specified sound/DSP connection is not ready. )
 UnityEngine.WWW:GetAudioClip(Boolean, Boolean, AudioType)
 <LoadFiles>c__Iterator0:MoveNext() (at Assets/Scripts/LoadFolder.cs:38)
 UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

My code:

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using System.IO;
 using System.Linq;
 
 public class LoadFolder : MonoBehaviour
 {
 
     public string PathString;
 
     public SproutSoundList ListScript;
 
     public AudioClip SproutSound;
 
     void Start()
     {
         ListScript = GameObject.Find("ScriptCargo").GetComponent<SproutSoundList>();
     }
 
     public void StartLoading()
     {
         PathString = transform.parent.FindChild("Path").FindChild("PathDir").GetComponent<UnityEngine.UI.Text>().text;
         PathString.Replace("\\", "/");
         StartCoroutine("LoadFiles");
     }
 
     IEnumerator LoadFiles()
     {
         string Url = string.Format("file://{0}", PathString);
         WWW www = new WWW(Url);
         yield return www;
 
         foreach (string File in Directory.GetFiles(PathString))
         {
             if (Path.GetFileName(File).Contains(".wav") || Path.GetFileName(File).Contains(".WAV"))
             {
                 SproutSound = www.GetAudioClip(false, false, AudioType.WAV);
                 SproutSound.name = Path.GetFileName(File);
                 ListScript.SoundList.Add(SproutSound);
             }
         }    
     }
 
 }
 

How to fix that??

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tanoshimi · Jan 02, 2017 at 09:15 AM 0
Share

What certain folder? How is it different from other folders that do work? What version of Unity? What operating system?

avatar image Ambrose998800 tanoshimi · Jan 02, 2017 at 09:34 AM 0
Share

Thanks for your effort!

The folder the path leads to; can be any folder on the harddisk. I never got it to work, I just read people used that code without problems. Unity 5.5.0f3 Win7 x64, SP1

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by metge · May 22, 2017 at 05:07 AM

using UnityEngine; using System.Collections;

public class TestAudio : MonoBehaviour { private AudioSource _audiopoint; // аудио источник private WWW _www;

 void Start()
 {
     _audiopoint = GetComponent<AudioSource>();
 }


 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.Space))
     {
         //StartCoroutine(DownloadAndPlay("http://www.tannerhelland.com/dmusic/AMemoryAway.ogg"));

          StartCoroutine(DownloadAndPlay("file:///"+ Application.dataPath + "/UserSounds/" + "/my.ogg"));
     }
 } 

 IEnumerator DownloadAndPlay(string url)
 {
     Debug.Log(url);
     _www = new WWW(url);
     Debug.Log("Start Dowload");
     yield return _www;
     Debug.Log("Playing");
     _audiopoint = GetComponent<AudioSource>();
     _audiopoint.clip = _www.GetAudioClip(false, true, AudioType.OGGVORBIS);
     _audiopoint.clip.name = "Downloaded clip";
     _audiopoint.Play();
 }

}

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by GDesmoulins · Jan 22, 2019 at 09:57 PM

Be carefull of special Characters in your sound filePath ! for my part : { and } caused this problem

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

79 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

FMOD returns error code 78 (FMOD_ERR_UNIMPLEMENTED) executing setMix 3 Answers

FMOD : driver fail 0 Answers

FMOD failed to initialize ... A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted. 0 Answers

Error: FMOD failed to initialize - Also in standalone AND other unity games 1 Answer

Build for Windows Phone 8 problem 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges