![]() |
![]() |
#41 |
Warhasneverbeensomuchfun
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 41
Posts: 3,450
|
If I use this library on my Blitz Basic game, I should credit both Idrougge and Phx ?
|
![]() |
![]() |
#42 |
Registered User
Join Date: Jan 2009
Location: Barcelona / Spain
Posts: 440
|
I have pending to try this lib, I could use for future games and Redpill. Lib authors will be credited.
|
![]() |
![]() |
#43 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 1,017
|
Does anyone else have lag on sound effects?
I haven't been experimenting with it. Its just my first experience. It could easily be my code not the lib. I just ask to know what to expect. edit: I've been experimenting and I always have a constant lag(approximately little less than half a second) no matter if its within the existing game or clean code with nothing else going on, no matter if I add mtinstall(which doesn't crash at my side), channel mask and/or play sfx loaded like sounds or like banks. Last edited by Cobe; 06 September 2019 at 22:57. |
![]() |
![]() |
#44 | |
Registered User
Join Date: Jan 2009
Location: Barcelona / Spain
Posts: 440
|
I noticed the lag on FX, but it also happens with standard Blitz command.
Is there a way to stop FX? Or if a new sound plays and the last one is still playing it stops and plays the new one? Quote:
|
|
![]() |
![]() |
#45 | |
Registered User
Join Date: Oct 2008
Location: Finland
Posts: 643
|
Quote:
|
|
![]() |
![]() |
#46 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 1,017
|
|
![]() |
![]() |
#47 |
Registered User
Join Date: Jan 2009
Location: Barcelona / Spain
Posts: 440
|
In my case it was a real Amiga with 060, as said it happened too with the default Blitz funcion Sound
|
![]() |
![]() |
#48 | |||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,586
|
Sorry, mised that.
No. At least not in my games, and also not in other games using ptplayer. Quote:
When you call mt_playfx for a new sound effect, it will take until the next CIA-B music timer interrupt before replay starts. This delay depends on the tempo of the MOD (default is 50 times per second, or tempo 125, which you can modify with command Fxx, where xx is >= $20). So either you have loaded/initialized (mt_init) a very slow MOD, or it is a problem with Blitz Basic. Quote:
Quote:
|
|||
![]() |
![]() |
#49 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,561
|
Going out on a limb here, but are you sure the samples in question have no silence at the start?
|
![]() |
![]() |
#50 | |
Registered User
Join Date: Jan 2009
Location: Barcelona / Spain
Posts: 440
|
There is a sound FX player in Blitz:
Sound Sound#,Channelmask[, Vol1[, Vol2...] Sound causes a previously created sound object to be played through the Amiga's audio hardware. Channelmask specifies which of the Amiga's four audio channels the sound should be played through, and should be in the range one through fifhteen. To be clear, the lag is in the game itself, not in the sound, the sound plays fine but it is the game that has a minor slowdown when playing it. It may be something from Blitz itself, or something I do that is messing up with the CIAs, because it happens to me with all libs Quote:
|
|
![]() |
![]() |
#51 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 1,017
|
@earok
First thing I double checked before posting is that samples accidentally don't have some silence at the beginnings and they didn't. @all I heard it right, there was no lag on real Amiga. So I checked my winuae setup better and found that I had sound buffer set to 8. So I put it to min and now there's no lag. So false alarm. Sorry guys, it was my stupid "mistake". |
![]() |
![]() |
#52 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 1,017
|
Is there a way to force sfx on desired channel?
e.g. if nuclear attack from the left side mtsoundfx boom,64,channel 2 if nuclear attack from the right side mtsoundfx boom,64,channel 3 |
![]() |
![]() |
#53 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,381
|
You could probably use MTMusicMask to set only one channel available for effects.
|
![]() |
![]() |
#54 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 1,017
|
Seems that you can set musicmask just once..
|
![]() |
![]() |
#55 |
Registered User
Join Date: Jan 2014
Location: Belgrade / Serbia
Age: 41
Posts: 1,017
|
edit: solved. You have to call mtinstall every time you change the mask.
edit2: and start the music again. So noo... |
![]() |
![]() |
#56 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 620
|
After initial troubles rebuilding deflibs (see the other thread. But with libman (and avoiding lib number collisions) it works well) I got this running fine.
Thank you phx and idrougge! ![]() I tried 10 mods and 8 work well. ![]() ---- May I give some feedback? mtInstall was NOT needed, but did no harm in my installation (winuae, a1200, amiblitz 2.42) How to check if a mod could be loaded: If the modfile is not found you won't get any error or crash, but play will play garbage. LoadBank doesn't return a value but there's a nice way to check it: Code:
LoadBank 0,"filename.mod",2 If Bank(0) = 0 then NPrint "cant load mod":VWait 50: End Trivia: If you load a file named "" the above method will still return a value lol. -- Idea: "mtPlay off" will leave the last note continue playing. "mtEnd" pauses the song and ends the note (still possible to continue the song) How about replacing "mtPlay off" with the function of "mtEnd"? (unless somebody needs it of course) And replacing "mtEnd" with something that stops and rewinds the song. Like mtEnd:MtInit x,0 Just an idea of course... Great work, thanks for this lib! ![]() |
![]() |
![]() |
#57 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,419
|
I've been trying this library out recently too, and by and large it's excellent, thanks! However, I have a slight issue with a sound sample that plays a high pitch tone when the sound is finished, until that channel is used again by the mod or another sound. The sample is only a very short blip, and plays fine using the original Blitz commands.
Any ideas? Is there a minimum length the samples should be, or am I missing something? |
![]() |
![]() |
#58 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 620
|
I dont have the time right now to search for where it was, but I think I read it's a known issue and the first two bytes of the sample have to be zero because this is what's getting looped. (I could be wrong)
Btw, thanks for all your help Daedalus! Highly appreciate it! ![]() ![]() edit: This thread? Last edited by Nightshft; 21 October 2019 at 13:40. |
![]() |
![]() |
#59 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,326
|
I think it was discussed in the original thread or some other with phx PT engine topic.
|
![]() |
![]() |
#60 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,419
|
Ah, sounds like a lead, thanks guys!
|
![]() |
Currently Active Users Viewing This Thread: 3 (0 members and 3 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Demos with music or sound effects in time with graphic effects | mark_k | request.Demos | 7 | 07 December 2016 20:23 |
Sound issue, not all sound effects played. | Connorsdad | support.WinUAE | 16 | 23 February 2015 16:32 |
Sound Effects in IK+ | noel411 | support.Games | 3 | 07 September 2007 03:12 |
IK+ sound effects not working | andreas | support.WinUAE | 4 | 26 July 2005 20:21 |
How to rip sound / effects | wlcina | support.Games | 16 | 18 April 2005 03:09 |
|
|