
uFMOD v1.15 supports PureBasic v3.50 or later
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
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 ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
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)Amiga5k wrote:I would REALLY like to get a commitment from Fred about adding this officially to the PB package.
My libmodplug is a good start i think 

Amiga5k
chris_b
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.
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.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).
chris_b
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...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)
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.
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
Download: http://ufmod.sf.net
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.
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:
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:
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?
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
(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
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?
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: BTW, the DirectSound version seems to work nicely in conjunction with Windows PB's native sound functions if you use the following:
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: (Although on my system the streaming buffer needs global instead of sticky focus for it to behave properly
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 wrote: I don't know much about DirectSound so perhaps it doesn't work properly on all systems?
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: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?
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 wrote:Are you using PB native sound functions at the same time?
Then, it's OK, IMHO. I guess InitSound registers a sticky focus too (or a global one) for the primary buffer used in PB.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.
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
http://sourceforge.net/project/showfile ... _id=158498
Changes:
http://sourceforge.net/project/shownote ... _id=158498
Added another DirectSound PB example based on your code, among other changes. Thanks!chris_b wrote:BTW, the DirectSound version seems to work nicely in conjunction with Windows PB's native sound functions[...]
uFMOD 1.19 for Linux is finally released. Changelog.
Version 1.20 for Win32 released.
Changes:
http://sourceforge.net/project/shownote ... _id=158498
Enjoy!
Changes:
http://sourceforge.net/project/shownote ... _id=158498
Enjoy!