uFMOD v1.15 supports PureBasic v3.50 or later

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

Amazing job :)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Amiga5k
Enthusiast
Enthusiast
Posts: 329
Joined: Fri Apr 25, 2003 8:57 pm

Post by Amiga5k »

Yeah, great job!

I would REALLY like to get a commitment from Fred about adding this officially to the PB package.

BTW, Madtracker and some other mod players can load different formats and save them as .xm, so not all mod formats need to be supported by uFMod (In fact, that's one of the things that makes it so small and fast: Only need to support one format).

Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
chris_b
Enthusiast
Enthusiast
Posts: 103
Joined: Sun Apr 27, 2003 1:54 am

Post by chris_b »

Amiga5k wrote:I would REALLY like to get a commitment from Fred about adding this officially to the PB package.
Well it's not really for me to say - but if there's to be a new module player built in to PB I'd want it to be fully cross platform and also support Impulse Tracker modules with filter cutoff and resonance controls (which aren't available in the .xm format)
KarLKoX
Enthusiast
Enthusiast
Posts: 681
Joined: Mon Oct 06, 2003 7:13 pm
Location: France
Contact:

Post by KarLKoX »

My libmodplug is a good start i think :)
"Qui baise trop bouffe un poil." P. Desproges

http://karlkox.blogspot.com/
Quantum
User
User
Posts: 51
Joined: Fri May 19, 2006 5:26 am
Contact:

Post by Quantum »

Amiga5k
BTW, Madtracker and some other mod players can load different formats and save them as .xm, so not all mod formats need to be supported by uFMod (In fact, that's one of the things that makes it so small and fast: Only need to support one format).
In theory, at least it, mod and s3m are losslessly "convertable" into xm. All these module formats are considered somewhat obsolete and I'd suggest using v2m instead. Actually, I've started to use v2m in my own apps. Unfortunately, there isn't any good open source or at least freeware lib to play those files and no public specs available.

chris_b
but if there's to be a new module player built in to PB I'd want it to be fully cross platform and also support Impulse Tracker modules with filter cutoff and resonance controls (which aren't available in the .xm format)
Well, uFMOD runs in Win32, Linux and BSD. So, it's more crossplatform than many other similar libraries. We're starting to support Kolibri as well. I guess you mean lack of Mac and Amiga support. It's funny an originally amiga module format not supported in Amiga :) Let's say it's still work in progress...

I'm afraid we probably won't support IT. First of all, it whould increase lib size. Second, there are more advanced module formats, like v2m. I'd really like to make a v2m lib someday.
Quantum
User
User
Posts: 51
Joined: Fri May 19, 2006 5:26 am
Contact:

Post by Quantum »

uFMOD v1.19 for Win32 available for download. Linux and BSD versions coming soon.

Release notes and changes:
http://sourceforge.net/project/shownote ... _id=158498

Code: Select all

[+] uFMOD_PlaySong supports a new flag: XM_NOLOOP
    (play the track only once)
[+] Added a new tool: xmstrip
[+] 2 new examples for Borland C++ Builder contributed by
    dododo.
[*] Modified XM effects implementation to make some
    tracks sound better. This affects 'porta tone'
    effects and unaligned bidirectional (aka ping-pong
    loops)
[*] Documentation completely updated. A new section added:
    tools (about eff and xmstrip).
[*] A lot of size and speed optimization.
Download: http://ufmod.sf.net
chris_b
Enthusiast
Enthusiast
Posts: 103
Joined: Sun Apr 27, 2003 1:54 am

Post by chris_b »

nice update, especially the xmstrip tool.

BTW, the DirectSound version seems to work nicely in conjunction with Windows PB's native sound functions if you use the following:

Code: Select all

Global DirectSound.IDirectSound

InitSound()

!extrn _PB_DirectSound
!MOV dword EAX, [_PB_DirectSound]
!MOV dword [v_DirectSound],EAX
instead of calling DirectSoundCreate(0,@DirectSound.IDirectSound,0) and DirectSound\SetCooperativeLevel() directly.

(Although on my system the streaming buffer needs global instead of sticky focus for it to behave properly, so I add "#DSBCAPS_GLOBALFOCUS = $8000" to dsufmod.pbi and use the line:

Code: Select all

bufDesc.DSBUFFERDESC\dwFlags = #DSBCAPS_GLOBALFOCUS  | #DSBCAPS_GETCURRENTPOSITION2
in the buffer description part of the code.)

Maybe this is a useful tip, I'm not sure...I don't know much about DirectSound so perhaps it doesn't work properly on all systems?
Quantum
User
User
Posts: 51
Joined: Fri May 19, 2006 5:26 am
Contact:

Post by Quantum »

chris_b wrote: BTW, the DirectSound version seems to work nicely in conjunction with Windows PB's native sound functions if you use the following:
Some people don't like inline asm. So, I'm not sure wich way is the proper one. But thats a valuable point anyway. Thanks!
chris_b wrote: (Although on my system the streaming buffer needs global instead of sticky focus for it to behave properly
DirectSound stops a buffer when it's window (the one registered with SetCooperativeLevel) loses the focus. In the example we don't even have a window handle of our own, because there's no main window in the app. So, sticky focus is required to make uFMOD buffer audible. Doesn't the example work on your system?
chris_b wrote: I don't know much about DirectSound so perhaps it doesn't work properly on all systems?
Seems more like a PB conflict in PB native sound lib (internally using DirectSound). Are you using PB native sound functions at the same time?
chris_b
Enthusiast
Enthusiast
Posts: 103
Joined: Sun Apr 27, 2003 1:54 am

Post by chris_b »

Quantum wrote:DirectSound stops a buffer when it's window (the one registered with SetCooperativeLevel) loses the focus. In the example we don't even have a window handle of our own, because there's no main window in the app. So, sticky focus is required to make uFMOD buffer audible. Doesn't the example work on your system?
The original example works perfectly. The problem I had is when the sticky focus buffer is created in conjunction with PB's InitSound() function: when calling uFMOD_DSPlaySong() the first second or two of music is sort of sped up or it jumps a bit at the start.
Quantum wrote:Are you using PB native sound functions at the same time?
Yes - there'd be no need to use PB's InitSound() function just to play the music - I assumed my method would be preferable to having a single application create two seperate IDirectSound interfaces (one for music and one for sound effects), but I'm not sure if I'm doing it correctly.
Quantum
User
User
Posts: 51
Joined: Fri May 19, 2006 5:26 am
Contact:

Post by Quantum »

chris_b wrote:Yes - there'd be no need to use PB's InitSound() function just to play the music - I assumed my method would be preferable to having a single application create two seperate IDirectSound interfaces (one for music and one for sound effects), but I'm not sure if I'm doing it correctly.
Then, it's OK, IMHO. I guess InitSound registers a sticky focus too (or a global one) for the primary buffer used in PB.
Quantum
User
User
Posts: 51
Joined: Fri May 19, 2006 5:26 am
Contact:

Post by Quantum »

uFMOD maintenance release 1.19.1 for Win32 is available for download:
http://sourceforge.net/project/showfile ... _id=158498

Changes:
http://sourceforge.net/project/shownote ... _id=158498
chris_b wrote:BTW, the DirectSound version seems to work nicely in conjunction with Windows PB's native sound functions[...]
Added another DirectSound PB example based on your code, among other changes. Thanks!
Quantum
User
User
Posts: 51
Joined: Fri May 19, 2006 5:26 am
Contact:

Post by Quantum »

uFMOD 1.19 for Linux is finally released. Changelog.
Quantum
User
User
Posts: 51
Joined: Fri May 19, 2006 5:26 am
Contact:

Post by Quantum »

Unix package v1.19 is available for download. Linux package updated to v1.19.1.
User avatar
yoxola
Enthusiast
Enthusiast
Posts: 386
Joined: Sat Feb 25, 2006 4:23 pm

Post by yoxola »

Especially thanks for this nice library, I can keep work on my project and avoid the whole big FMOD library.

Great.
Quantum
User
User
Posts: 51
Joined: Fri May 19, 2006 5:26 am
Contact:

Post by Quantum »

Version 1.20 for Win32 released.

Changes:
http://sourceforge.net/project/shownote ... _id=158498

Enjoy!
Post Reply