Skip to content

Commit 937f0d6

Browse files
padscore: Make WENCGetEncodeData take an enum arg (#440)
* padscore: Make `WENCGetEncodeData` take an enum arg Because only 0 and 1 are valid values * typedef correction * Slight adjustments
1 parent 975aebe commit 937f0d6

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎include/padscore/wpad.h‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,15 @@ typedef enum WPADBalanceBoardCmd
415415
WPAD_BALANCE_BOARD_CMD_ON = 0xAA,
416416
} WPADBalanceBoardCmd;
417417

418+
//! Encoding mode
419+
typedef enum WENCMode
420+
{
421+
//! Reset parameters before encode
422+
WENC_MODE_RESET = 0,
423+
//! Encode using prior parameters
424+
WENC_MODE_CONTINUE = 1
425+
} WENCMode;
426+
418427
//! 2D vector.
419428
struct WPADVec2D
420429
{
@@ -954,7 +963,7 @@ WPADSendStreamData(WPADChan channel,
954963
/**
955964
* Encode 16-bit LPCM as 4-bit Yamaha ADPCM
956965
* \param params encoding continuation params, written on first call, and read and updated on each subsequent call
957-
* \param continuing should be TRUE if continuing encoding stream with the params produced via a prior call
966+
* \param mode should be WENC_MODE_CONTINUE if continuing encoding stream with the params produced via a prior call
958967
* \param [in] samples 16-bit LPCM sample buffer
959968
* \param sampleCount number of 16-bit LPCM samples
960969
* \param [out] outEncodedData buffer for the returned ADPCM samples, size should be {(sampleCount + 1) / 2}
@@ -965,7 +974,7 @@ WPADSendStreamData(WPADChan channel,
965974
*/
966975
uint32_t
967976
WENCGetEncodeData(WENCParams *params,
968-
BOOL continuing,
977+
WENCMode mode,
969978
const int16_t *samples,
970979
uint32_t sampleCount,
971980
uint8_t *outEncodedData);

0 commit comments

Comments
 (0)