can't get AYFX to work

Страница 3/4
1 | 2 | | 4

By norakomi

Paragon (1089)

Аватар пользователя norakomi

17-10-2019, 21:47

Artrag: Do you know if this code rotates the psg channels every interrupt ?
And to stop the sfx, can I just call this code:
AFXSTOP:
ld hl,DATA_AREA
ld b,END_DATA_AREA-DATA_AREA
.loop:
ld (hl),0
inc hl
djnz .loop
??

By ARTRAG

Enlighted (6493)

Аватар пользователя ARTRAG

17-10-2019, 22:34

This code doesn't rotate channels, as it is using a the whole psg for sfxs
If you want to stop all sfxs currently playing and reset the aysfx bank, you can call afxstop in my code (not sure about the above routine, there was some reason to have in afxBnkAdr a valid bank and in afxChData+2+n*11 the value of FFFFh).
In any case, afxstop will not mute the PSG till you call ROUT in my code.
If you need to stop a single sfx on a given channel you can reset afxChData+ 1 +11*n where n=0,1 or 2 for the 3 channels
To mute the PSG sound from last sfx frame you need to call AFXFRAME first and later ROUT

By norakomi

Paragon (1089)

Аватар пользователя norakomi

18-10-2019, 07:59

oh, this is so helpful !
thanks for the info !

By Bengalack

Champion (331)

Аватар пользователя Bengalack

14-11-2020, 20:27

Old thread. Yes. But I'm looking into the same things these days. Things work - there is sound, and I recognise the soundclips. I'm using the ayFX replayer 1.31 almost as is, just added silence when clips has ended. But I experience a delay. Not sure where the culprit is. Using sounds from Shiru's sfxcollection, that should start off quite quickly. Haven't tested on real hardware, but using openMSX there is a delay after the soundclip has been "inititated". Has anyone else experienced it?

From the looks of it, it seems like Uridium has the delay too (just test online at tfh), but I can't say for sure, as don't know that game too well, nor its implementation.

Kind of problematic when the jump sound kicks off when Mario is almost halfway into the jump oO

Could be something I do in my code. --Or not Smile

By Manuel

Ascended (17692)

Аватар пользователя Manuel

14-11-2020, 22:43

Check whether you have the same delay in other games that make a sound directly when touching a key. If yes, then it's probably something in your system that causes openMSX to have a large sound lag. It happens sometimes.

By Bengalack

Champion (331)

Аватар пользователя Bengalack

14-11-2020, 23:15

Thanks for the tip Manuel. Will check more tomorrow. Tested now using BlueMSX, and sounds starts earlier / less lag. There might be a slight delay there too, but not as much (perceivably). Time to test the app on a physical msx then. It's been a while :-)

By Manuel

Ascended (17692)

Аватар пользователя Manuel

14-11-2020, 23:14

Did you try a game, say Maze of Galious or Vampire Killer on openMSX?

See https://openmsx.org/manual/faq.html#soundproblems for the hint: try to change the samples setting via the console to something smaller. If you make it too small, you'll get clicks/ticks/cracks. But it may be worth trying it out.

By Bengalack

Champion (331)

Аватар пользователя Bengalack

14-11-2020, 23:22

Awesome Manuel! That fixed it.

set samples 300

Default had 2048. 256 was too little. 300 seems to give the right result in my scenario. "Responsive" sound according to the player movements. Great! Thanks again Smile

By Manuel

Ascended (17692)

Аватар пользователя Manuel

14-11-2020, 23:32

I have it on 512 myself on my Linux box, since 2001. I believe Wouter has it on 256. At least in the past most Windows systems required a much higher value, that's why we have put it on 2048 by default on Windows.

By Bengalack

Champion (331)

Аватар пользователя Bengalack

15-11-2020, 08:22

Ok. Maybe there is change in windows 10 vs XP/Vista/8?
And the setting should be a power of two? So if I write 300 it gets to be 512 behind the scenes?

Страница 3/4
1 | 2 | | 4