Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Microphone not found — Gideros Forum

Microphone not found

rikolousrikolous Member
edited October 2015 in General questions
I am returning to finish my app I started a year ago. I just reinstalled Gideros but my app requires the microphone. I installed the microphone.dll file to my plugins folder. Whenever I run my app or the example microphone app I get the following error:

main.lua:1: module 'microphone' not found:
no field package.preload['microphone']
no file '.\microphone.lua'
no file 'C:\Program Files (x86)\Gideros\lua\microphone.lua'
no file 'C:\Program Files (x86)\Gideros\lua\microphone\init.lua'
no file 'C:\Program Files (x86)\Gideros\microphone.lua'
no file 'C:\Program Files (x86)\Gideros\microphone\init.lua'
no file '.\microphone.dll'
no file 'C:\Program Files (x86)\Gideros\microphone.dll'
no file 'C:\Program Files (x86)\Gideros\loadall.dll'
stack traceback:
main.lua:1: in main chunk

Am I missing something for the microphone installation? Did something change in the last year or so?

Comments

  • Still having the problem. Is there anybody that can help?
  • ar2rsawseenar2rsawseen Maintainer
    Accepted Answer
    Did you build microphone plugin yourself?
    I just noticed that it is not added to build scripts to bundle with release

    I tried to build it myself and it seems to be working great.
    Will add to build scripts, but in the mean time, attaching my working .dll
    zip
    zip
    microphone.zip
    13K
  • Yeah I downloaded an older version (pre-gihub) and it worked. Thank you so much. I will reinstall the latest and see if that works.
  • No I used your plugin provided.
  • Just an update. Your file worked. Thank you. I did have the old microphone.dll before and it wasn't working. Your file definitely works. I don't know if there is a difference but there was a difference for me.
  • Okay now there is one last problem before I am caught up to how my app was running a year ago. The microphone works from my desktop but I am having a problem running it from my android still. I have a Galaxy Note 3. I installed the APK file on my device to run Gideros Android Player. When I open it, it still gives an error message. Previously when I ran my app through Eclipse I followed these set of instructions to access the microphone:

    Android

    Copy bin/Android/* to libs directory.
    Copy source/com/* to your project.
    Add System.loadLibrary("microphone"); to your main Activity.
    Add "com.giderosmobile.android.plugins.microphone.GMicrophone" to externalClasses array.
    Add android.permission.RECORD_AUDIO permission.

    However, I don't know where to make those changes or if I even should now that I am going through the Gideros Android Player and not Eclipse.

    The error message is similar to the previous one:

    main.lua:3: module 'microphone' not found:
    no field package.preload['microphone']
    no file './microphone.lua'
    no file '/usr/local/share/lua/5.1/microphone.lua'
    no file '/usr/local/share/lua/5.1/microphone/init.lua'
    no file '/usr/local/lib/lua/5.1/microphone.lua'
    no file '/usr/local/lib/lua/5.1/microphone/init.lua'
    no file './microphone.so'
    no file '/usr/local/lib/lua/5.1/microphone.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
    stack traceback:
    main.lua:3: in main chunk
  • Gideros player by default does not contain microphone plugin, but you can export any Gideros project, add microphone plugin to it and remove assets folder inside assets folder, and it will make it behave as Gideros Player
  • piepie Member
    I am unable to use microphone plugin on windows (didn't try android yet)
    I get
    attempt to index global 'Microphone' (a nil value)
    I tried using both dll (from gideros install folder and from @ar2rsawseen post) in gideros/Plugins.
    Should I "require" the plugin in some way?
    I tried just creating a new Microphone object
    local recorder = Microphone.new(nil, 4000, 1, 8)
    (I am still on gideros 2015.12 because I have issues downloading 2016_04 - always fails on the long run.. )
    thank you :)

  • @pie I have problems with downloading, too. I'm going to start using a download manager.
  • piepie Member
    [OT @simwhi it took some retries but I did it! :)
    I don't know if you can use a download manager, firefox couldn't retry nor resume this download ]

    I can confirm that Microphone plugin on windows7 and gideros 2016.04 is working,
    @ar2sawseen or @john26 it seems that there is a double mistype here in event properties: http://docs.giderosmobile.com/reference/plugin/Microphone/Event.DATA_AVAILABLE#Event.DATA_AVAILABLE
    xxxAmplitute should be xxxAmplitude

    thank you :)
  • piepie Member
    I'm sorry @ar2rsawseen I am having some troubles with microphone plugin on Android:

    I followed all the instructions for installation, the only uncertainty I have is about the "external class array" since in release 2016.04 is a bit different from before.

    Does this sound correct to you? :)
    	static private String[] externalClasses = {
    		//Line below is a marker for plugin insertion scripts. Do not remove or change
    		//GIDEROS-EXTERNAL-CLASS//
    			null,
    			"com.giderosmobile.android.plugins.GMicrophone"
    	};
    If I run the "player app" (without assets/assets/ folder) the player crashes as soon as I upload the source (eclipse says fatal error 11 (SIGSEGV) at 0x0000000c... the usual cryptic message of doom, while running "complete app" (with assets/assets folder) it won't crash.
    Microphone doesn't seem to work anyway on android (even if there's no crash).

    On windows player instead it works fine.
    Is there something I could try before opening a github issue? :)

    Thank you very much
  • hgy29hgy29 Maintainer
    I think you should add your line before the null marker
  • piepie Member
    Thank you, I changed it to
    static private String[] externalClasses = {
    		//Line below is a marker for plugin insertion scripts. Do not remove or change
    		//GIDEROS-EXTERNAL-CLASS//
    			"com.giderosmobile.android.plugins.GMicrophone",
    			null
     
    	};
    but unfortunately it's not that :)
  • hgy29hgy29 Maintainer
    Sorry to hear that, I am out of clue then. We really need to get the automatic plugin integration stuff done!
  • ar2rsawseenar2rsawseen Maintainer
    SIGSEGV are usually native errors, so the problem is with libmicrophone,so files.
    Are they in the right place, tit you load them via System.load?
  • piepie Member
    edited April 2016
    Hi,
    libmicrophone.so files are in their respective folders under libs/ (copied from latest allplugins folder in gideros installation folder)

    this is my system.loadLibrary portion, do you see something wrong here?
    	static
    	{
    		System.loadLibrary("gvfs");
    		System.loadLibrary("lua");
    		System.loadLibrary("gideros");
    		System.loadLibrary("microphone");
     
    		System.loadLibrary("luasocket");
    		System.loadLibrary("lfs");
    		System.loadLibrary("lsqlite3");
    		System.loadLibrary("json");
    		System.loadLibrary("bitop");
    		//Line below is a marker for plugin insertion scripts. Do not remove or change
    		//GIDEROS-STATIC-INIT//
    	}
    Thank you :)

    P.s. the crash happens only if I remove the assets/assets directory to make a gideros player with mic support.
    If i compile the whole app it runs correctly but mic is not working
  • saeyssaeys Member
    The plugin folder tree structure in the program files/Gideros plugin folder differs from the structure in the exported folder structure, so blindly following the plugin installation instructions (like I did from the start) results in misplaced folders, plugins and .so files. And subsequent app crash at startup.

    I got it to work (after a long day trying to figure it out ~X( ) by copying
    All plugins/microphone/bin/Android/libs/*
    to
    EXPORT FOLDER/app/src/main/njiLibs/*
    (every jniLibs folder should then contain 9 different .so files)

    and
    All plugins/microphone/bin/Android/src/com/giderosmobile/android/plugins/microphone/GMicrophone.java
    to
    EXPORT FOLDER/app/src/main/java/com/giderosmobile/android/plugins/microphone
    Have a nice weekend! :bz
Sign In or Register to comment.