Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Stable versions
- Don't unmute muted IT channels unless explicitly unmuted by
the -S/--solo option.
- Haiku: Fix configure C++11 detection error message.
- AHI: fix crash on OpenDevice failure.
- ALSA: fix 8-bit and unsigned format mismatches after init.
- BeOS/Haiku: support 8-bit unsigned, strip unsigned otherwise.
- NetBSD: find the nearest match for the requested format.
Expand Down
9 changes: 4 additions & 5 deletions src/sound_ahi.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ static int init(struct options *options)
}
AHIReq[0]->ahir_Version = 4;

AHIReq[1] = AllocVec(sizeof(struct AHIRequest), SHAREDMEMFLAG);
if (AHIReq[1] == NULL) {
goto err;
}

if (OpenDevice((CONST_STRPTR)AHINAME, AHI_DEFAULT_UNIT,
(struct IORequest *)AHIReq[0], 0) != 0) {
goto err;
Expand Down Expand Up @@ -129,6 +124,10 @@ static int init(struct options *options)
AHIReq[0]->ahir_Volume = 0x10000;
AHIReq[0]->ahir_Position = 0x8000;

AHIReq[1] = AllocVec(sizeof(struct AHIRequest), SHAREDMEMFLAG);
if (AHIReq[1] == NULL) {
goto err;
}
CopyMem(AHIReq[0], AHIReq[1], sizeof(struct AHIRequest));

AHIBuf[0] = AllocVec(BUFFERSIZE, SHAREDMEMFLAG | MEMF_CLEAR);
Expand Down
Loading