mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-08-07 01:13:18 +00:00
Only "stop playing" if we ARE playing
This commit is contained in:
+4
-1
@@ -1114,15 +1114,18 @@ response_t AVCLAN_handleframe(const AVCLAN_frame_t *in, AVCLAN_frame_t *out) {
|
|||||||
case PACK3(dev_COMM_v1, dev_CD_CHANGER, Disable_Function_Req):
|
case PACK3(dev_COMM_v1, dev_CD_CHANGER, Disable_Function_Req):
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
case PACK3(dev_COMM_v2, dev_CD_CHANGER, Disable_Function_Req):
|
case PACK3(dev_COMM_v2, dev_CD_CHANGER, Disable_Function_Req):
|
||||||
|
// No change/response needed if we're already not playing
|
||||||
|
if (AVCLAN_isPlaying()) {
|
||||||
AVCLAN_stopPlaying();
|
AVCLAN_stopPlaying();
|
||||||
out->length = sizeof(function_change_resp);
|
out->length = sizeof(function_change_resp);
|
||||||
memcpy(out->data, function_change_resp, sizeof(function_change_resp));
|
memcpy(out->data, function_change_resp, sizeof(function_change_resp));
|
||||||
out->data[3] = Disable_Function_Resp;
|
out->data[3] = Disable_Function_Resp;
|
||||||
cd_status.state = cd_PLAYBACK | cd_SEEKING_TRACK;
|
cd_status.state = 0;
|
||||||
cd_status.flags2 = 0x80;
|
cd_status.flags2 = 0x80;
|
||||||
out->is_unicast = true;
|
out->is_unicast = true;
|
||||||
out->peripheral_addr = HU_ADDR;
|
out->peripheral_addr = HU_ADDR;
|
||||||
respond = r_StatusReport;
|
respond = r_StatusReport;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case PACK3(dev_CMD_SW, dev_CD_CHANGER, Eject): {
|
case PACK3(dev_CMD_SW, dev_CD_CHANGER, Eject): {
|
||||||
// "Eject" label is multiply wrong; proper meaning unclear:
|
// "Eject" label is multiply wrong; proper meaning unclear:
|
||||||
|
|||||||
Reference in New Issue
Block a user