Tips for Game Editor native Linux Port (sound included)

Linux specific questions and discussion

Tips for Game Editor native Linux Port (sound included)

Postby chicoscience » Mon Mar 26, 2012 2:42 am

Tips are mainly fo ubuntu but will work in any new Linux system if you change details.

Sound Fix (still no MIDI)
Most Linux distros are using pulseaudio as the default sound server. The hardware level for soundcards is still in alsa / oss4 (the new oss that has nothing to do with the old one). Pulseaudio is able to work with programs developed with pulseaudio in mind or alsa/oss4 devices and many others.

Since Linux audio is kind of a mess. There's wrappers for everything. In the case of legacy oss -> pulseaudio you can use a utility called padsp avaliable from the pulseaudio-utils package. This package is installed by default on Ubuntu but not on debian and fedora, so apt-get install pulseaudio-utils and yum install pulseaudio-utils on these systems.

Once you have it, do this to have the native linux game editor stream its audio to pulseaudio.

Code: Select all
cd path/to/gameeditor/folder
padsp ./gameEditorLinux


That's it. Sound should be working. MIDI still wont work since padsp does not work with MIDI. You can see the error in the terminal asking for /dev/sequencer. Don't think there's a distro that still uses /dev/sequencer nowadays.

Problem with Ubuntu Unity
Most of the time, game editor will bug out without menu. It's because of compiz and unity. I can't fnd a solution but you can run ubuntu within other Desktop Environments. Here's a list.

Unity 2D
Gnome3 With gnome-shell: (apt-get install gnome-shell)
LXDE for most simplicity and peformance: (apt-get install lxde)
Xubuntu is a branded, more app rich version of LXDE (apt-get install xubuntu-desktop)
openbox: if you just want X running, thats it. It will appear in front of you so fast, with nothing at all, you will think it's not working. Just right click, open xterm and call the programs you want. Very primitive but good for performance. I use it to run audio programs. (apt-get install openbox) btw openbox is the default windows manager used on LXDE.

Hope it helps!
User avatar
chicoscience
 
Posts: 19
Joined: Fri Mar 23, 2012 10:49 pm
Score: 1 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby Hblade » Mon Mar 26, 2012 4:16 am

Awe, Permission denied even though I had sudo :( Oh well, thanks for this tip, I'm sure I'll get it right eventually ^^ Most likely because it's on my pendrive.

Edit: nope DX Moved to desktop and still denied :(

It says:
Code: Select all
/usr/bin/padsp: 88: exec: Desktop/GameEditor/gameEditorLinux: Permission denied
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby chicoscience » Mon Mar 26, 2012 5:26 am

Hblade wrote:Awe, Permission denied even though I had sudo :( Oh well, thanks for this tip, I'm sure I'll get it right eventually ^^ Most likely because it's on my pendrive.

Edit: nope DX Moved to desktop and still denied :(


DX?

Anyway. Are you sure it's marked as executable?

Code: Select all
chmod +x gameEditorLinux


Also, you're suposed to run as your user, not as root.
User avatar
chicoscience
 
Posts: 19
Joined: Fri Mar 23, 2012 10:49 pm
Score: 1 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby Hblade » Mon Mar 26, 2012 5:27 am

Ah.. The executable, heh.. I forgot to set it there. and "DX" is a face.

Thanks!

Edit: New problem, it closes instantly when it opens :( Opening it normally works though (but without audio)
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby chicoscience » Mon Mar 26, 2012 5:40 am

Hblade wrote:Ah.. The executable, heh.. I forgot to set it there. and "DX" is a face.

Thanks!

Edit: New problem, it closes instantly when it opens :( Opening it normally works though (but without audio)


"Desktop/GameEditor/gameEditorLinux" is the path you are using right? Run just like I described at the first post. You need to change to the game editor directory and padsp ./gameEditorLinux
User avatar
chicoscience
 
Posts: 19
Joined: Fri Mar 23, 2012 10:49 pm
Score: 1 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby Hblade » Mon Mar 26, 2012 12:49 pm

chicoscience wrote:
Hblade wrote:Ah.. The executable, heh.. I forgot to set it there. and "DX" is a face.

Thanks!

Edit: New problem, it closes instantly when it opens :( Opening it normally works though (but without audio)


"Desktop/GameEditor/gameEditorLinux" is the path you are using right? Run just like I described at the first post. You need to change to the game editor directory and padsp ./gameEditorLinux


Oh I'm sorry, I was super tired when I read this. Thanks so much for this tip :)
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby chicoscience » Mon Mar 26, 2012 3:29 pm

Yeah I thought you were tired by the hour of the post.
User avatar
chicoscience
 
Posts: 19
Joined: Fri Mar 23, 2012 10:49 pm
Score: 1 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby Hblade » Mon Mar 26, 2012 3:37 pm

Hahaha yeah.. :P Too bad though, the sound still doesn't work. There's no error messages in the terminal either :P

I'll just wait till 1.5 ^^
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby chicoscience » Mon Mar 26, 2012 8:27 pm

Now I'm just curious. I've been using padsp with programs that wont work with pulseaudio and alsa for sometime now and never had problems.

To find the source of your problem we should get this information:

1 - What Distro are you using?
2- Are you really using pulseaudio? Open terminal as your user and run pulseaudio. It will tell you if it is already runing:
Code: Select all
eden@nobunaga:~$ pulseaudio
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() falhou.

3 - How many audio devices you have? Sometimes we have more because of hdmi audio and usb headphone audio. Make sure you are using the real one. I tested with my usb headphone.
4 - Increse the volume of all your soundcards at driver level with alsamixer. open terminal, run alsamixer as your user and increase everything. Press F6 to change between devices.

Here's a video of it working. I tested with Bee-Ant's fighting demo. http://www.youtube.com/watch?v=5FTzmxEw2UI
User avatar
chicoscience
 
Posts: 19
Joined: Fri Mar 23, 2012 10:49 pm
Score: 1 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby Hblade » Mon Mar 26, 2012 8:45 pm

I ran pulseaudio and got the same results you did "already running".

Code: Select all
ERROR: ld.so: object 'libpulsedsp.so' from LD_PRELOAD cannot be preloaded: ignored.


This is what happens when I use the padsp command. Game Editor opens but the audio doesn't work.

I'm using Ubuntu 12.04 LTS

I Don't know how many sound devices I have :P
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby chicoscience » Mon Mar 26, 2012 9:13 pm

I take it's 64 bit right?

gameEditorLinux is a 32 bit executable file as you can see here:

Code: Select all
eden@nobunaga:~/projects/Dev/GameEditor$ file gameEditorLinux
gameEditorLinux: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped


So try installing these:

Code: Select all
sudo apt-get install ia32-libs ia32-libs-multiarch


Also if you want to know the audio devices you can try this:

Code: Select all
aplay -l
arecord -l


You can also find your audio devices within the Ubuntu Audio Preferences GUI.

Try it! I'm curious lol.
User avatar
chicoscience
 
Posts: 19
Joined: Fri Mar 23, 2012 10:49 pm
Score: 1 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby Hblade » Mon Mar 26, 2012 9:29 pm

lol this is turning out to be confusing. (I'm a noob at computers, I just know how to install Os's and crap)
The output:
Code: Select all
theunpropro@ubuntu:~$ sudo apt-get -f install ia32-libs ia32-libs-multiarch
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 ia32-libs-multiarch:i386 : Depends: bluez-alsa:i386 but it is not going to be installed
                            Depends: gstreamer0.10-plugins-base:i386 but it is not going to be installed
                            Depends: gstreamer0.10-plugins-good:i386 but it is not going to be installed
                            Depends: gstreamer0.10-fluendo-mp3:i386 but it is not going to be installed
                            Depends: gtk2-engines:i386 but it is not going to be installed
                            Depends: gtk2-engines-murrine:i386 but it is not going to be installed
                            Depends: gtk2-engines-pixbuf:i386 but it is not going to be installed
                            Depends: gtk2-engines-oxygen:i386 but it is not going to be installed
                            Depends: gvfs:i386 but it is not going to be installed
                            Depends: ibus-gtk:i386 but it is not going to be installed
                            Depends: libacl1:i386 but it is not going to be installed
                            Depends: libaio1:i386 but it is not going to be installed
                            Depends: libao4:i386 but it is not going to be installed
                            Depends: libasound2-plugins:i386 but it is not going to be installed
                            Depends: libasyncns0:i386 but it is not going to be installed
                            Depends: libattr1:i386 but it is not going to be installed
                            Depends: libaudio2:i386 but it is not going to be installed
                            Depends: libcanberra-gtk-module:i386 but it is not going to be installed
                            Depends: libcap2:i386 but it is not going to be installed
                            Depends: libcupsimage2:i386 but it is not going to be installed
                            Depends: libcurl3:i386 but it is not going to be installed
                            Depends: libdbus-glib-1-2:i386 but it is not going to be installed
                            Depends: libesd0:i386 but it is not going to be installed
                            Depends: libgail-common:i386
                            Depends: libgconf-2-4:i386 but it is not going to be installed
                            Depends: libgdbm3:i386 but it is not going to be installed
                            Depends: libgtk2.0-0:i386 but it is not going to be installed
                            Depends: libncursesw5:i386 but it is not going to be installed
                            Depends: libnspr4:i386 but it is not going to be installed
                            Depends: libnss3:i386 but it is not going to be installed
                            Depends: libodbc1:i386 but it is not going to be installed
                            Depends: libpulse-mainloop-glib0:i386 but it is not going to be installed
                            Depends: libqt4-dbus:i386 but it is not going to be installed
                            Depends: libqt4-network:i386 but it is not going to be installed
                            Depends: libqt4-opengl:i386 but it is not going to be installed
                            Depends: libqt4-qt3support:i386 but it is not going to be installed
                            Depends: libqt4-script:i386 but it is not going to be installed
                            Depends: libqt4-scripttools:i386 but it is not going to be installed
                            Depends: libqt4-sql:i386 but it is not going to be installed
                            Depends: libqt4-svg:i386 but it is not going to be installed
                            Depends: libqt4-test:i386 but it is not going to be installed
                            Depends: libqt4-xml:i386 but it is not going to be installed
                            Depends: libqt4-xmlpatterns:i386 but it is not going to be installed
                            Depends: libqtcore4:i386 but it is not going to be installed
                            Depends: libqtgui4:i386 but it is not going to be installed
                            Depends: libqtwebkit4:i386 but it is not going to be installed
                            Depends: librsvg2-common:i386 but it is not going to be installed
                            Depends: libsdl-mixer1.2:i386 but it is not going to be installed
                            Depends: libsdl-image1.2:i386 but it is not going to be installed
                            Depends: libsdl-net1.2:i386 but it is not going to be installed
                            Depends: libsdl-ttf2.0-0:i386 but it is not going to be installed
                            Depends: libsdl1.2debian:i386 but it is not going to be installed
                            Depends: libssl0.9.8:i386 but it is not going to be installed
                            Depends: libstdc++5:i386 but it is not going to be installed
                            Depends: libxaw7:i386 but it is not going to be installed
                            Depends: libxp6:i386 but it is not going to be installed
                            Depends: libxss1:i386 but it is not going to be installed
                            Depends: libxtst6:i386 but it is not going to be installed
                            Depends: odbcinst1debian2:i386 but it is not going to be installed
                            Depends: libpulsedsp:i386 but it is not going to be installed
                            Depends: xaw3dg:i386 but it is not going to be installed
 mint-meta-mate : Depends: python-mate-desktop but it is not going to be installed
 mintmenu : Depends: python-mate-desktop but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
theunpropro@ubuntu:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC887 Analog [ALC887 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: Headset [Logitech H360 Headset], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
theunpropro@ubuntu:~$ arecord -l
**** List of CAPTURE Hardware Devi



Yeah, I'm about as confused as a bear with bunny ears riding a unicycle down a highway while being chased by cops with elephant trunks.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby chicoscience » Mon Mar 26, 2012 10:04 pm

Yep. You have 2 soundscards. Your USB headset count as one. But I don't think this is the problem.

apt-get failed to install probably because the package list is outdated. But it could be because this Ubuntu version is beta and it's software repository is unstable.

Code: Select all
sudo apt-get update


then you try to install the packages again.

I also see it appears you have mate installed. Man that's a crazy setup lol. You're dancing in the middle of alpha / beta software.

Beta Ubuntu is not like beta gmail or something. It's REALLY beta.
User avatar
chicoscience
 
Posts: 19
Joined: Fri Mar 23, 2012 10:49 pm
Score: 1 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby Hblade » Mon Mar 26, 2012 10:15 pm

Hahaha, so I've learned the hard way. yeah I installed MATE but can't get it to run.

You seem to know a lot aboutlinux :) That makes me happy. (Yeah, derpy me, the red icon up top told me to updated.. >.>) Hey do you happen to know of a way I can record from both the mic AND the sound that goes on from software? (Such as a video game, record audio from it AND a mic at the same time)?

Trying your method now...
Actually I'll do that later, I'm lazy right now.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Tips for Game Editor native Linux Port (sound included)

Postby chicoscience » Mon Mar 26, 2012 10:57 pm

gtkrecordmydesktop is a very good software that records with audio. It will only do what you want if your sound card has builtin mixing capabilities. You can check that by running alsamixer or aplay / arecord.

If your soundcard doesn't have it, like mine, you can use kazam. It lets you choose two audio streams. One could be one that monitors your microphone and the other your regular phones / speaker. If you're using that usb headset just choose to monitor its mic and phones. https://launchpad.net/kazam
User avatar
chicoscience
 
Posts: 19
Joined: Fri Mar 23, 2012 10:49 pm
Score: 1 Give a positive score

Next

Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest

cron