ref: a6f7b5d3e289b8df1c6e165dc3c63883ca760db9
parent: 0931e5424bee3e4fc980fb40710a0aaba8e272de
author: Olav Sørensen <olav.sorensen@live.no>
date: Mon Nov 28 11:02:02 EST 2022
Minor changes/fixes
--- a/src/ft2_audio.c
+++ b/src/ft2_audio.c
@@ -885,7 +885,7 @@
pattSyncData.row = song.curReplayerRow;
pattSyncData.pattNum = song.curReplayerPattNum;
pattSyncData.songPos = song.curReplayerSongPos;
- pattSyncData.BPM = song.BPM;
+ pattSyncData.BPM = (uint8_t)song.BPM;
pattSyncData.speed = (uint8_t)song.speed;
pattSyncData.globalVolume = (uint8_t)song.globalVolume;
pattSyncData.timestamp = audio.tickTime64;
--- a/src/ft2_audio.h
+++ b/src/ft2_audio.h
@@ -57,7 +57,7 @@
uint32_t volumeRampLength;
uintCPUWord_t positionFrac, delta, oldDelta, scopeDelta;
-#
+
// if (loopEnabled && hasLooped && samplingPos <= loopStart+SINC_LEFT_TAPS) readFixedTapsFromThisPointer();
const int8_t *leftEdgeTaps8;
const int16_t *leftEdgeTaps16;
@@ -66,12 +66,22 @@
float fVolume, fVolumeL, fVolumeR, fVolumeLDelta, fVolumeRDelta, fVolumeLTarget, fVolumeRTarget;
} voice_t;
-typedef struct pattSyncData_t
+#ifdef _MSC_VER
+#pragma pack(push)
+#pragma pack(1)
+#endif
+typedef struct pattSyncData_t // used for audio/video sync queue (pack to save RAM)
{
- uint8_t pattNum, globalVolume, songPos, tick, speed, row;
- uint16_t BPM;
+ uint8_t pattNum, globalVolume, songPos, tick, speed, row, BPM;
uint64_t timestamp;
-} pattSyncData_t;
+}
+#ifdef __GNUC__
+__attribute__ ((packed))
+#endif
+pattSyncData_t;
+#ifdef _MSC_VER
+#pragma pack(pop)
+#endif
typedef struct pattSync_t
{