fbsound 1.0 Win/Lin 32/64-bit (wav mp3 ogg mod it xm s3m)
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
All tests working here on Mint 18.3 xfce 64 bit. Most i like "fbs_get_playingsounds_ogg.bas" with the fractals. Really nice work!
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
Good to know :-)lizard wrote:All tests working here on Mint 18.3 xfce 64 bit.
Joshy
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
I had to install some additional 'libasound' libraries, but I hear sound now! Thanks!
Fbc 1.04.0 32-bit, Ubuntu Mate 16.04 64-bit.
I'll run all the tests later today...
Edit: All examples run as expected.
Fbc 1.04.0 32-bit, Ubuntu Mate 16.04 64-bit.
I'll run all the tests later today...
Edit: All examples run as expected.
Last edited by badidea on Apr 21, 2018 22:01, edited 1 time in total.
-
- Posts: 993
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
Thank you Joshy and congratulations for the new release of fbsound. Works perfectly here (Windows 10 64, FBC 1.05.0 for Win32).
-
- Posts: 993
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
I would like to include in a project only the necessary files to load and play a WAV sound. So I tried this code:
But if I delete, for example, the lib\win32\libfbsdsp.a file, I get this error:
Code: Select all
#define NODSP
#define NOMOD
#define NOMP3
#define NOOGG
#include once "fbsound\inc\fbsound.bi"
Is it normal?C:\FBC\1.05.0\bin\win32\ld.exe: cannot find -lfbsdsp
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
@badidea thank you for testing :-)
@Roland set your defines in fbsstypes.bi
and recompile the library.
Should work so far I know :-)
Joshy
@Roland set your defines in fbsstypes.bi
and recompile the library.
Should work so far I know :-)
Joshy
-
- Posts: 993
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
Works perfectly, thank you.D.J.Peters wrote:@Roland set your defines in fbsstypes.bi
and recompile the library.
Should work so far I know :-)
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
Although the program compiled and ran ok I did get this warning?
Beautiful demo.
Command executed:
"C:\FreeBasic\fbc.exe" "E:\fbsound-1.0\tests\fbs_get_playingsounds_mp3.bas"
Compiler output:
E:\fbsound-1.0\tests\fbs_get_playingsounds_mp3.bas() warning 20(2): Object files or libraries with mixed multithreading (-mt) options, ../lib/win32\libfbscpu.a
Results:
Compilation successful
Generated executable: E:\fbsound-1.0\tests\fbs_get_playingsounds_mp3.exe
System:
FBIde: 0.4.6
fbc: FreeBASIC Compiler - Version 1.05.0 (01-31-2016), built for win32 (32bit)
OS: Windows NT 6.2 (build 9200)
Beautiful demo.
Command executed:
"C:\FreeBasic\fbc.exe" "E:\fbsound-1.0\tests\fbs_get_playingsounds_mp3.bas"
Compiler output:
E:\fbsound-1.0\tests\fbs_get_playingsounds_mp3.bas() warning 20(2): Object files or libraries with mixed multithreading (-mt) options, ../lib/win32\libfbscpu.a
Results:
Compilation successful
Generated executable: E:\fbsound-1.0\tests\fbs_get_playingsounds_mp3.exe
System:
FBIde: 0.4.6
fbc: FreeBASIC Compiler - Version 1.05.0 (01-31-2016), built for win32 (32bit)
OS: Windows NT 6.2 (build 9200)
-
- Posts: 993
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
@BasicCoder2
The warning is expected. If you want to get rid of it, you can compile with "-mt" option.
The warning is expected. If you want to get rid of it, you can compile with "-mt" option.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
Thank you it's my favorite in many reasons also.lizard wrote:Most i like "fbs_get_playingsounds_ogg.bas" with the fractals. Really nice work!
1) "2005" It was my first successful go in FreeBASIC inline assembler.
2) Legends of the fall are not a part of my all stars top 10 movies but the soundtrack it's so beauty to me.
3) My favorite movie soundtrack composer "James Horner" are gone for ever.
4) If I'm drunken and I miss him as my favorite composer than I watch this short Mandelbrot tribute.
I'm become a little bit sad again what a f***.
@BasicCoder2 take a short look at: https://www.freebasic.net/wiki/wikka.ph ... pilerOptmt
Sometimes I think it would be a great feature if the first and only the first line of source code
are reading by the compiler as optional command line arguments.
Joshy
Like this:
Code: Select all
command-line: -lang fb gen gcc -O2 -mt -asm intel
print "How cool is that :-)"
sleep
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
Simply replace the soundfile with this and be ...D.J.Peters wrote:I'm become a little bit sad again what a f***.
https://www.youtube.com/watch?v=KnYjQHkHnD8
... happy! :-)
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
His music don't make me sad, my favorite composer died that was the point.lizard wrote:Simply replace the soundfile with this and be ...
But it's OK i'm happy again :-)
Joshy
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
May I ask a short question here?
How do I check that a sound object is being played?
E.g. On press "h", I want to sound a horn, but only if the horn is not already active.
How do I check that a sound object is being played?
E.g. On press "h", I want to sound a horn, but only if the horn is not already active.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
Good question there isn't a fbs_Get_SoundStatus() command
but If only one sound are playing you can use fbs_Get_PlayingSounds()
if the result are 0 then there are no playing sounds currently.
but you can get the loop counter:
Play the sound with a loop counter of 1 (normal one playback)
dim as integer nLoops
...
fbs_Get_SoundLoops(hSound, @nLoops)
if nLoops=0 then fbs_Play_Sound(hSond,1)
Or do it like a boss :-)
get the sound pointers and compare current play position with the start position:
if play position = start position then fbs_Play_Sound(hSound)
pPlay=pStart means it was never played or it was played
but on end of the sound the play position are reset to it's start position
for the next fbs_Play_Sound() command.
dim as short ptr pStart,pPlay
...
fbs_Get_SoundPointers(hSound, @pStart, @pPlay)
if pPlay=pStart then fbs_Play_Sound(hSound)
Let me know if you need a short example.
Joshy
but If only one sound are playing you can use fbs_Get_PlayingSounds()
if the result are 0 then there are no playing sounds currently.
but you can get the loop counter:
Play the sound with a loop counter of 1 (normal one playback)
dim as integer nLoops
...
fbs_Get_SoundLoops(hSound, @nLoops)
if nLoops=0 then fbs_Play_Sound(hSond,1)
Or do it like a boss :-)
get the sound pointers and compare current play position with the start position:
if play position = start position then fbs_Play_Sound(hSound)
pPlay=pStart means it was never played or it was played
but on end of the sound the play position are reset to it's start position
for the next fbs_Play_Sound() command.
dim as short ptr pStart,pPlay
...
fbs_Get_SoundPointers(hSound, @pStart, @pPlay)
if pPlay=pStart then fbs_Play_Sound(hSound)
Let me know if you need a short example.
Joshy
Re: fbsound 1.0 Linux Windows 32/64-bit (wav mp3 ogg mod it xm s3m)
Thanks, I was already on the right track apparently.D.J.Peters wrote:...
With fbs_Play_Sound(hSound, 1):
fbs_Get_SoundLoops(hSound, @nLoops) seems do do the job for me most convenient. Before 0, during 1, ended 0
fbs_Get_SoundPosition(hSound, @sPos) requires a rewind, otherwise: Before 0.0, during 0.0 ... 1.0, ended 1.0
I did not try the other options.
Code: Select all
function my_fbs_Sound_playing(hSound as integer) as boolean
dim as integer nLoops
fbs_Get_SoundLoops(hSound, @nLoops)
if nLoops = 0 then return false
return true
end function