Fix style/indendation issues in sound_ahi.c.#85
Merged
sezero merged 1 commit intolibxmp:masterfrom Mar 12, 2026
Merged
Conversation
Collaborator
|
Tested under linux-hosted i386 AROS. Inverted condition for tmp in while loop of play(): --- sound_ahi.c~
+++ sound_ahi.c
@@ -149,11 +149,10 @@ static void play(void *b, int len) {
len -= chunk;
in += chunk;
- tmp = CheckIO((struct IORequest *) AHIReq[active ^ 1]);
-
AHIReq[active]->ahir_Std.io_Data = AHIBuf[active];
AHIReq[active]->ahir_Std.io_Length = chunk;
+ tmp = CheckIO((struct IORequest *) AHIReq[active ^ 1]);
- AHIReq[active]->ahir_Link = tmp ? AHIReq[active ^ 1] : NULL;
+ AHIReq[active]->ahir_Link = tmp ? NULL : AHIReq[active ^ 1];
SendIO((struct IORequest *) AHIReq[active]);
active ^= 1;
} |
3b2841a to
492d889
Compare
- Replace 4 space indentation with hard tabs.
- Fix various instances of function { being on the wrong line.
- Refactor init() to use early return like most other places in
libxmp and xmp-cli.
- Cast AHINAME to CONST_STRPTR to avoid pointer signedness warnings
(bebbo amiga-gcc uses signed char by default, API defines this
to unsigned char).
- Clear active on init (avoids potential issues if the driver ever
gets initialized twice in one session).
492d889 to
df219bb
Compare
Contributor
Author
Should be fixed now. |
Collaborator
Yes. |
Contributor
Author
|
I'm fairly certain this is equivalent to the old code and should still work (or at least have the same bugs as the old code). I may try to get the old adtools amigaos-cross-toolchain working, but this code does compile with my local build of bebbo's toolchain. |
sezero
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
init()to use early return like most other places in libxmp and xmp-cli.AHINAMEtoCONST_STRPTRto avoid pointer signedness warnings (bebbo amiga-gcc uses signed char by default, API defines this to unsigned char).activeon init (avoids potential issues if the driver ever gets initialized twice in one session).Only compile-tested with bebbo amiga-gcc 6.5.0b, so marking as draft for now.