Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Using more SDL projects?  (Read 2731 times)

0 Members and 1 Guest are viewing this topic.

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • View Profile
Using more SDL projects?
« on: March 05, 2014, 10:18:24 AM »

I'm wondering why wmelite uses "separate" libraries for font rendering, image loading and audio processing, and not "SDL_ttf", "SDL_image" and "SDL_mixer".

It surely makes no sense to change the first two now, as they work fine on all platforms. I wonder whether it would make sense to have SDL_mixer as replacement for BASS, allowing packages for several Linux distributions to be built (and accepted).

Mnemonic, do you have any insights how difficult the BASS replacement might be?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5671
    • View Profile
    • Dead:Code Site
Re: Using more SDL projects?
« Reply #1 on: March 06, 2014, 06:15:43 PM »

Unfortunately, I know next to nothing about SDL mixer. I will have to take a look one of those days.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • View Profile
Re: Using more SDL projects?
« Reply #2 on: March 07, 2014, 10:55:47 AM »

Ok, I'll look into it and see if I can get it to work somehow.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • View Profile
Re: Using more SDL projects?
« Reply #3 on: March 08, 2014, 03:48:22 PM »

I put all my changes into this repo:

https://bitbucket.org/hardcoredaniel/freewmelite

It requires a modified SDL_mixer from here:

https://bitbucket.org/hardcoredaniel/wmelite-dependencies-for-linux-and-android

The other dependencies are unchanged.

The WME touch demo seems to work. Bigger projects start behaving funny when the mixer channels are all used up. So this will require some more work until it is usable.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • View Profile
Re: Using more SDL projects?
« Reply #4 on: March 21, 2014, 11:30:40 AM »

Hi Mnemonic,

I want to integrate the SDL_mixer variant into regular wmelite. It does not make sense to keep the fork around if there are in fact just 2 files "replaced".

Here's my idea for integration, please let me know what you think:

1) Add dedicated macros for LOBYTE/HIWORD/MAKEWORD... into BPersistMgr.cpp. Currently the #defines from BASS are used, but the non-bass version should not depend on that. The Macro's names should be different to not be redefinitions in case bass.h is there. Once that is done, wmelite is prepared to cope with different sound system implementations :)

2) Move the BSoundBuffer.* and BSoundMgr.* files into a "BASS" subdirectory, and place the "SDL_mixer" counterparts into its dedicated subdirectory as well. Regular wmelite now includes the former, the SDL_mixer based implementation uses the latter sources and header files.

As a result, every platform would now have a "default" build target (BASS) after some small path adaptations. For those who want SDL_mixer, a separate build target/Makefile/whatever would be required.

I hope that with this approach it will be possible to package wmelite for Linux distributions (without BASS), up to the point where a distribution might decide to add it to their official repositories (sometime in the distant future). There's still a lot of work to be done before the implementation is ready though.

What is your opinion on that?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5671
    • View Profile
    • Dead:Code Site
Re: Using more SDL projects?
« Reply #5 on: March 22, 2014, 12:53:11 PM »

Sounds good to me! As long as the change really happens in just the two classes this should be easy enough to maintain.
Possibly less disruptive for starters might be to keep the BASS files where they are now and only add the subdir for SDL_mixer, so that we don't have to change all the existing project files for win/osx/ios.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.153 seconds with 18 queries.