Mod Archive Forums Mod Archive Forums
Advanced search  

News:

Please note: Your main modarchive.org account will not work here, you must create a forum account to post on the forums.

Pages: 1 [2] 3   Go Down

Author Topic: libbass-based module player for Linux  (Read 24462 times)

0 Members and 1 Guest are viewing this topic.

68k

  • Wants more Pie
  • Offline Offline
  • Posts: 5
    • View Profile
Re: libbass-based module player for Linux
« Reply #10 on: December 12, 2011, 19:54:48 »

The source at the moment is a mess

Totally understandable! I know some of my code is quite bad and I would probably die of humiliation if anyone saw it.
Logged

almos

  • Devouring the Pies
  • Offline Offline
  • Posts: 14
    • View Profile
Re: libbass-based module player for Linux
« Reply #11 on: December 17, 2011, 09:21:55 »

Last distribution turned out to be slightly screwed due to the bad macro; I'm working on making it work.

EDIT: Problem solved: the source installation of bassplay_gtk can be downloaded from Sourceforge. Enjoy!
« Last Edit: December 18, 2011, 15:01:38 by almos »
Logged

Koli

  • TMA Moderator
  • Pie Addict
  • Offline Offline
  • Posts: 68
    • View Profile
    • BitFellas
Re: libbass-based module player for Linux
« Reply #12 on: January 01, 2012, 16:37:07 »

Unfortunately, I'm having trouble compiling the GTK source on Ubuntu 11.10 x64. I've installed build-essentials, intltool and libgtk2 (along with all the dependencies they bring in), extracted BASS for Linux into /bass within the source directory, configured bassplay, but I'm getting a lot of 'undefined reference' errors right on compile so it doesn't finish.

I guess I'm missing something, but I've no idea what...  :(
Logged

almos

  • Devouring the Pies
  • Offline Offline
  • Posts: 14
    • View Profile
Re: libbass-based module player for Linux
« Reply #13 on: January 05, 2012, 19:26:19 »

Koli: do the errors pop up during the compilation or during the configuration? Are the BASS headers unpacked into the /usr/local/include directory (the full path to extract the BASS headers to is /usr/local/headers/bass) and is libbass.so installed in the /usr/local/lib directory? If these conditions are met, please post the compiler output so I can figure what is wrong.

Sorry for the delay in response, the only thing I can offer as an excuse is - work!

Logged

Koli

  • TMA Moderator
  • Pie Addict
  • Offline Offline
  • Posts: 68
    • View Profile
    • BitFellas
Re: libbass-based module player for Linux
« Reply #14 on: January 05, 2012, 21:35:40 »

During compilation. I just extracted the headers into /usr/local/headers/bass and into /usr/local/include, while libbass.so is also in /usr/local/lib (tried both the x86 and x64 library), but it's still throwing the same 'undefined reference' errors. I rarely compile software, so I'm no doubt making a silly error somewhere.

Here's the output:

Code: [Select]
make  all-recursive
make[1]: Entering directory `/home/koli/Software/bassplay_gtk-0.1'
Making all in src
make[2]: Entering directory `/home/koli/Software/bassplay_gtk-0.1/src'
  CCLD   bassplay_gtk
main.o: In function `main':
/home/koli/Software/bassplay_gtk-0.1/src/main.c:90: undefined reference to `BASS_Init'
/home/koli/Software/bassplay_gtk-0.1/src/main.c:107: undefined reference to `BASS_Free'
callbacks.o: In function `on_play_button_click':
/home/koli/Software/bassplay_gtk-0.1/src/callbacks.c:75: undefined reference to `BASS_ChannelIsActive'
/home/koli/Software/bassplay_gtk-0.1/src/callbacks.c:77: undefined reference to `BASS_ChannelIsActive'
/home/koli/Software/bassplay_gtk-0.1/src/callbacks.c:78: undefined reference to `BASS_ChannelPlay'
callbacks.o: In function `on_volume_control_change':
/home/koli/Software/bassplay_gtk-0.1/src/callbacks.c:101: undefined reference to `BASS_ChannelSetAttribute'
helper_funcs.o: In function `handle_bass_error':
/home/koli/Software/bassplay_gtk-0.1/src/helper_funcs.c:93: undefined reference to `BASS_ErrorGetCode'
/home/koli/Software/bassplay_gtk-0.1/src/helper_funcs.c:95: undefined reference to `BASS_ErrorGetCode'
helper_funcs.o: In function `update_position_slider':
/home/koli/Software/bassplay_gtk-0.1/src/helper_funcs.c:119: undefined reference to `BASS_ChannelGetPosition'
/home/koli/Software/bassplay_gtk-0.1/src/helper_funcs.c:120: undefined reference to `BASS_ChannelBytes2Seconds'
helper_funcs.o: In function `update_label_text':
/home/koli/Software/bassplay_gtk-0.1/src/helper_funcs.c:140: undefined reference to `BASS_ChannelGetTags'
helper_funcs.o: In function `setup_music_slider':
/home/koli/Software/bassplay_gtk-0.1/src/helper_funcs.c:164: undefined reference to `BASS_ChannelGetLength'
/home/koli/Software/bassplay_gtk-0.1/src/helper_funcs.c:165: undefined reference to `BASS_ChannelBytes2Seconds'
helper_funcs.o: In function `choose_and_begin_playback':
/home/koli/Software/bassplay_gtk-0.1/src/helper_funcs.c:64: undefined reference to `BASS_ChannelSetAttribute'
/home/koli/Software/bassplay_gtk-0.1/src/helper_funcs.c:58: undefined reference to `BASS_MusicFree'
play.o: In function `start_playback':
/home/koli/Software/bassplay_gtk-0.1/src/play.c:9: undefined reference to `BASS_MusicLoad'
/home/koli/Software/bassplay_gtk-0.1/src/play.c:17: undefined reference to `BASS_ChannelPlay'
play.o: In function `pause_playback':
/home/koli/Software/bassplay_gtk-0.1/src/play.c:23: undefined reference to `BASS_ChannelIsActive'
play.o: In function `stop_playback':
/home/koli/Software/bassplay_gtk-0.1/src/play.c:30: undefined reference to `BASS_ChannelStop'
play.o: In function `pause_playback':
/home/koli/Software/bassplay_gtk-0.1/src/play.c:25: undefined reference to `BASS_ChannelPause'
/home/koli/Software/bassplay_gtk-0.1/src/play.c:24: undefined reference to `BASS_ChannelPlay'
play.o: In function `stop_playback':
/home/koli/Software/bassplay_gtk-0.1/src/play.c:31: undefined reference to `BASS_ChannelSetPosition'
play.o: In function `adjust_volume':
/home/koli/Software/bassplay_gtk-0.1/src/play.c:49: undefined reference to `BASS_ChannelSetAttribute'
collect2: ld returned 1 exit status
make[2]: *** [bassplay_gtk] Error 1
make[2]: Leaving directory `/home/koli/Software/bassplay_gtk-0.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/koli/Software/bassplay_gtk-0.1'
make: *** [all] Error 2
Logged

almos

  • Devouring the Pies
  • Offline Offline
  • Posts: 14
    • View Profile
Re: libbass-based module player for Linux
« Reply #15 on: January 06, 2012, 11:09:08 »

Actually, Bassplay is my first ever Linux distribution, so it's equally probable I made some error while preparing it.
My mistake from the previous post - it should be /usr/local/include/bass instead of /usr/local/headers/bass! However, it seems from the code you posted that the problems occur at the linking stage. Check for the permissions for the libbas.so installed in the /usr/local/lib subdirectory - or try to change them by hand:

Code: [Select]
sudo chmod 644 /usr/local/lib/libbass.so
Then remove the directory unpacked from tarball and unpack the tarball again. Enter the directory and try to compile the source

I just got results similar to those you got by removing the reading permissions for libbass.so for all the users and groups, so I assume that if the library is in path and the linker still gives you unknown reference errors it might be the case of badly set permissions. Alternately, you can try to run both the configure script and the make commands with the as root  (or via sudo), but the method I gave you worked for me only after I removed the directory unpacked from the tarball and unpacked it again (alternately, you can clean the project via make clean).

I hope this helps!
Logged

Koli

  • TMA Moderator
  • Pie Addict
  • Offline Offline
  • Posts: 68
    • View Profile
    • BitFellas
Re: libbass-based module player for Linux
« Reply #16 on: January 06, 2012, 15:00:34 »

SUCCESS!  ;D

Had to copy the x64 library to /usr/lib after doing sudo make install, but it's working flawlessly, even with PulseAudio.  ;D

Le image: http://cosmic-dreams.net/images/ubuntu/11_10/bassplay_gtk.png

Strange why it connects to PulseAudio with 7.1 though (I only have stereo audio). No matter, it's working. :)
Logged

almos

  • Devouring the Pies
  • Offline Offline
  • Posts: 14
    • View Profile
Re: libbass-based module player for Linux
« Reply #17 on: January 06, 2012, 15:26:35 »

Congratulations then - and I hope you enjoy using it!
Logged

Koli

  • TMA Moderator
  • Pie Addict
  • Offline Offline
  • Posts: 68
    • View Profile
    • BitFellas
Re: libbass-based module player for Linux
« Reply #18 on: January 06, 2012, 15:30:28 »

I get a segmentation fault when I try to open up a second module, but I guess that will happen considering the player's very early nature.
Logged

almos

  • Devouring the Pies
  • Offline Offline
  • Posts: 14
    • View Profile
Re: libbass-based module player for Linux
« Reply #19 on: January 06, 2012, 16:06:28 »

That's strange - I play several modules in a row and don't get segmentation fault. There used to be an issue with this earlier on, when I figured out that I'm launching off new threads without terminating threads that don't need to go on (more specifically, the position of the slider is updated by a separate thread that I plan on using for keeping track of several playback parameters at once), but once I got it fixed the program ceased to crash - on my computer, at least. Do you get segmentation faults each and every time you're launching a new module?
Logged
Pages: 1 [2] 3   Go Up