view win95kggui/dep/ft2play/pmp_mix.h @ 133:0d8eabdd12ab default tip

create: write H:MM:SS timestamps, add option to fill with gaussian-blur instead of black many albums are longer than one hour so writing H:MM:SS is a necessity. if anything there will just be verbose info that isn't important for my use-case. however the gaussian-blur is simply broken. It works, and it plays locally just fine, but YouTube in particular elongates the video to fit the full width. I'm not entirely sure why it does this, but it makes it useless and ugly.
author Paper <paper@tflc.us>
date Sat, 03 Jan 2026 20:25:38 -0500
parents 8e4ee43d3b81
children
line wrap: on
line source

#pragma once

#include <stdint.h>
#include <stdbool.h>
#include "pmplay.h"

enum
{
	Status_SetVol = 1,
	Status_SetPan = 2,
	Status_SetFrq = 4,
	Status_StartTone = 8,
	Status_StopTone = 16,
	Status_QuickVol = 32,

	SType_Fwd = 1,
	SType_Rev = 2,
	SType_RevDir = 4,
	SType_Off = 8,
	SType_16 = 16,
	SType_Fadeout = 32
};

typedef struct
{
	const void *SBase, *SRevBase;
	uint8_t SType, SPan, SVol;
	int32_t SLVol1, SRVol1, SLVol2, SRVol2, SLVolIP, SRVolIP, SVolIPLen;
	int32_t SLen, SRepS, SRepL, SPos, SMixType;
	uint32_t SPosDec, SFrq;
} CIType;

typedef struct
{
	const void *SBase;
	uint8_t Status, SType;
	int16_t SVol, SPan;
	int32_t SFrq, SLen, SRepS, SRepL, SStartPos;
} WaveChannelInfoType;

extern int16_t chnReloc[32];
extern int32_t *CDA_MixBuffer;
extern CIType CI[32 * 2];

void P_SetSpeed(uint16_t bpm);
void P_StartTone(sampleTyp *s, int32_t smpStartPos);

// 8bb: added these two
bool mix_Init(int32_t audioBufferSize);
void mix_Free(void);
// -------------------

void mix_ClearChannels(void);
void mix_UpdateBuffer(int16_t *buffer, int32_t numSamples);

bool dump_Init(int32_t frq, int32_t amp, int16_t songPos);
void dump_Close(void);
bool dump_EndOfTune(int32_t endSongPos);
int32_t dump_GetFrame(int16_t *p);