freebasic.net Forum Index
FreeBASIC's Official Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in

Last testing release FBSOUND for Windows and Linux.
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
 
Post new topic   Reply to topic    freebasic.net Forum Index -> Libraries
View previous topic :: View next topic  
Author Message
D.J.Peters
Guru
PostPosted: Jul 22, 2006 23:26    Post subject: Last testing release FBSOUND for Windows and Linux. Reply with quote

for curent downloads take a look at:
http://www.freebasic.net/wiki/wikka.php?wakka=ExtLibfbsound

Joshy


Last edited by D.J.Peters on Jan 06, 2008 0:51; edited 7 times in total
 
Back to top
View user's profile Visit poster's website
Sisophon2001
Master
PostPosted: Jul 23, 2006 12:39    Post subject: Reply with quote

Not tested yet, but thanks. The old version worked well in Windows and Linux, so I assume this contains improvements?

Garvan
 
Back to top
View user's profile Send e-mail Visit poster's website
Pritchard
Guru
PostPosted: Jul 23, 2006 12:53    Post subject: Reply with quote

It works fine here ^_^;; Nice choice of music btw.
 
Back to top
View user's profile Send e-mail
D.J.Peters
Guru
PostPosted: Jul 23, 2006 14:33    Post subject: Reply with quote

Sisophon2001 wrote:
... The old version worked well in Windows and Linux, so I assume this contains improvements?

Sorry the improvements are not the main part of this release i changed the thread modell of the lib and use more CPU instuctions so i need feedback from diffrent OS's (98se,Me,XP,2000/NT,Linux) and diffrent CPU's 486-XXX with diffrent clock rates.

If your tests works all right i will not change the plugout interface and put the missing DSP and networkstreaming in the lib.

You know

Joshy
 
Back to top
View user's profile Visit poster's website
D.J.Peters
Guru
PostPosted: Jul 23, 2006 16:35    Post subject: Reply with quote

FBSound 0.01 now aviable:

Download:
http://www.freebasic.net/wiki/wikka.php?wakka=ExtLibfbsound

Joshy


Last edited by D.J.Peters on Jan 06, 2008 0:52; edited 2 times in total
 
Back to top
View user's profile Visit poster's website
rdc
Master
PostPosted: Jul 23, 2006 19:09    Post subject: Reply with quote

Everything seems to work except for Test3 which crashes when it exits:

Quote:

debug: fbs:exit
debug: mm2:stop
debug: mm2:exit
debug: fbs:~
debug: cpu:~ <- crashes here.


Win2k Pro, AMD 1.1 ghz, 256 mg.

I tried looking at it in Insight, and I get a heap error:



All the other test worked fine. That fractal program is very hypnotic. Nice job on this.
 
Back to top
View user's profile Send e-mail Visit poster's website
D.J.Peters
Guru
PostPosted: Jul 23, 2006 21:07    Post subject: Reply with quote

Damn what are differs between XP and 2000 :-(
and why only Test3 crash's

Joshy


Last edited by D.J.Peters on Jan 06, 2008 0:52; edited 1 time in total
 
Back to top
View user's profile Visit poster's website
D.J.Peters
Guru
PostPosted: Jul 23, 2006 21:56    Post subject: Reply with quote

rdc please try this i added fbs_destroy_wave on then end.
Thanx Joshy
Code:
'  #############
' # test3.bas #
'#############
Option Explicit
#include "fbsound.bi"

' simple test for:
' fbs_init
' fbs_load_mp3file !!!
' fbs_play_sound
' fbs_get_plugerror


Dim As BOOLEAN IsInit

IsInit=FBS_INIT() ' 44,1 KHz. 16 Bit 2 Channels 3 Buffers a 2048 Frames

If IsInit=false Then
  ? "No free playback driver found!"
  ? FBS_Get_PlugError()
  End 1
End If

Dim As Integer hWave(10),i,soundn,maxsounds,delay,new_nSounds,old_nSounds
? "loading 10 MP3 file s..."
For i=0 To 9
  If FBS_Load_Mp3File("mixertest"+trim(Str(i+1))+".mp3",@hWave(i))=false Then
    ? "error loading mp3"
    End 1
  End If
Next

? "mixer test"
? "It will mix hundred sounds in realtime!"
FBS_Play_Wave hWave(0)
delay=100
Sleep delay

'
' main loop
'
Do
  If maxSounds<100 Then
    SoundN=Rnd*9
    ' play hWave(0-9) 1-3 times in random speed 0.5-1.5
    FBS_Play_Wave hWave(SoundN),1+Rnd*3,0.5+Rnd
    Sleep 50
  End If
  new_nSounds=FBS_Get_PlayingSounds()
  If new_nSounds <> old_nSounds Then
    If new_nSounds>maxsounds Then maxSounds=new_nSounds
    Print "Active playing sounds =" + Str(new_nSounds)
    old_nSounds = new_nSounds
  End If
  Sleep 10
Loop While old_nSounds>0

For i=0 To 9
  fbs_destroy_Wave @hWave(i)
Next
End
 
Back to top
View user's profile Visit poster's website
rdc
Master
PostPosted: Jul 23, 2006 22:06    Post subject: Reply with quote

No, it still crashes in the same spot.
 
Back to top
View user's profile Send e-mail Visit poster's website
D.J.Peters
Guru
PostPosted: Jul 23, 2006 22:24    Post subject: Reply with quote

It crashed after playing 100 sounds?
 
Back to top
View user's profile Visit poster's website
MystikShadows
Sr. Member
PostPosted: Jul 23, 2006 22:39    Post subject: Reply with quote

D.J.Peters wrote:
Dam what are differs between XP and 2000 :-(
and why only Test3 crash's

Joshy

]
I believe that XP uses a method called thunking for it's sound timing accuracy, and 2000 uses pure 32 but timing. not sure if it's relevant but it's sound related, so maybe. :-)
 
Back to top
View user's profile Send e-mail Visit poster's website MSN Messenger
D.J.Peters
Guru
PostPosted: Jul 23, 2006 23:12    Post subject: Reply with quote

MystikShadows thanx for your info but the playback/latency seams to be ok.


after mm2:stop ' all sounds are off and all threads are exit
after mm2:exit ' the device are closed
after mm2:exit ' all memory are free
and fbs:~ is the libfbsound.a destructor
and cpu:~ is the libmmncpu.a destructor <- crashes here.

sub mmncpu_exit() destructor
dprint("cpu:~")
end sub

prints only a debug message on stderr

I have no 2000 and can't debug it :-(
 
Back to top
View user's profile Visit poster's website
D.J.Peters
Guru
PostPosted: Jul 23, 2006 23:45    Post subject: Reply with quote

FBSound 0.01 now aviable:

Download:
http://www.freebasic.net/wiki/wikka.php?wakka=ExtLibfbsound

Joshy


Last edited by D.J.Peters on Jan 06, 2008 0:53; edited 2 times in total
 
Back to top
View user's profile Visit poster's website
rdc
Master
PostPosted: Jul 24, 2006 0:49    Post subject: Reply with quote

This is what I get:

Quote:

(gdb) r
Starting program: C:\Languages\FreeBASIC\examples\fbsound\test3.exe
warning: HEAP[test3.exe]:
warning: Heap block at 002FA1A8 modified at 002FC1B0 past requested size of 2000



Program received signal SIGTRAP, Trace/breakpoint trap.
0x77f9193d in ?? ()
(gdb)


It is the same error I get in Insight. Here is a pic of the registers at the crash. Not sure if it tells you anything.



It seems to me there may be a Null pointer being referenced somewhere. Of course if nobody else is getting this error, then it may be with my machine. As I said, all the other examples are working. I am not sure that anyone would ever try and load 100 sounds at the same time, so I am not sure this is all that critical.
 
Back to top
View user's profile Send e-mail Visit poster's website
rdc
Master
PostPosted: Jul 24, 2006 1:24    Post subject: Reply with quote

It appears the problem is in the test program, not the lib calls. I did a simple for-next calling FBS_Play_Wave and FBS_Get_PlayingSounds() and it worked perfectly. As soon as I put it in the Do-Loop, it crashes. Could there be some asm conflicts with a Do-Loop? The for-next worked just fine.

Edit: The problem seems to be with FBS_Get_PlayingSounds() being called in a loop. I replaced the Do-Loop with a goto and it still crashed. If I don't call the function I don't get a crash.
 
Back to top
View user's profile Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    freebasic.net Forum Index -> Libraries All times are GMT
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 1 of 9

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



sf.net phatcode