-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consecutive calling of echo_play_direct() #30
Comments
I believe I can use |
Using So probably the routine is broken as heck :| (and maybe some race condition… really, Echo's communication with the 68000 needs to be redone from scratch at this point) |
Ah, I thought this bit of the code would be enough for if (z80_ram[0x1F00] != 0xFF)
status |= ECHO_STAT_DIRBUSY; I was also considering speed up the tick timer to decrease the "wait" time of direct events. For my use case, I don't know ahead of time when I need to play a note or series of notes, so I'm relying on the direct functionality to provide a near-realtime experience. Updating Echo every VBlank isn't snappy enough, so I'd rather be able to at least poll something to know when it's safe to submit another direct event. |
Oh right, forgot that >_> (was thinking on the other busy flag) Though even then it still shouldn't matter as long as the buffer isn't overflown, and it doesn't look like it should here, so it's more likely that something is going awfully wrong. Assuming Echo is even initialized properly (nobody uses the C API because SGDK comes bundled with XGM instead…) Also you could send a command that changes timer B (Tanglewood does this to get 50Hz), though honestly you make it sound like what you need is a custom driver with the 68000 driving everything. We really need more sound drivers (Echo is atrocious and I haven't deprecated it yet only because the alternative isn't much better) |
Ok thanks for the tips! I may well go with the 68k driving it all because I think that ultimately it will give the most responsive results. I'll have a play and see if I can tweak Echo enough to be useable for now. The EEF format has what I need so I might end up building something that is at least compatible with it. |
I think I fixed the issue? (didn't really try it though) Yeah, the way status flags were handled was wrong, but it seems it was also recomputing the length of the direct buffer wrong (including the arguments but not the event opcodes themselves, whoops). Hopefully it works now? |
Looks like it works better! It doesn't make a high pitched whine, but the second note is dropped unless I wait for ECHO_STAT_DIRBUSY to clear:
But I think that's OK. |
Uuuuuuh I guess that's another thing to fix -_-' |
Hi there! I'm trying to make use of Echo to power a real-time PSG audio application. I have a question regarding the correct use of
echo_play_direct()
. Consider the following code:I have found that I cannot call
echo_play_direct()
straight after a previous call to the same function. If I do so, you can hear a high-pitched whine, presumably caused by some corruption. I have to wait some X amount of time (hence the commented call toVDP_waitVSync()
.How can I ensure that a consecutive call works correctly?
The text was updated successfully, but these errors were encountered: