リファレンスの解説内に (真偽値) という表記があります。これは 0 なら「偽」、0 以外なら「真」を意味します。「処理の成否 (真偽値)」とあれば、処理が成功すれば 0 以外を返し、失敗すれば 0 を返します。
ピストンコラージュを生成します。
int __stdcall pxeasy_Ready( int channel_num, int sample_per_second, int bit_per_sample, int buffer_milisecond, int using_directsound);
すでに生成されているピストンコラージュを再設定します。
int __stdcall pxeasy_Reset( int channel_num, int sample_per_second, int bit_per_sample, int buffer_milisecond, int using_directsound);
ピストンコラージュを開放します。
Result __stdcall pxeasy_Release(void);
pxtone.dll のエラー情報を取得します。
int __stdcall pxeasy_CopyLastError( char* destination, int buffer_bytes);
利用側で文字列の格納先を作成し、そこにコピーします。データコピーだけを行うので、他の言語でも利用できる可能性があります。
ピストンコラージュが設定しているチャンネル数を取得します。
int __stdcall pxeasy_GetChannels(void);
ピストンコラージュが設定している秒間サンプル数を取得します。
int __stdcall pxeasy_GetSamplesPerSecond(void);
ピストンコラージュが設定しているサンプル量子化数を取得します。
int __stdcall pxeasy_GetBitsPerSample(void);
ピストンコラージュがバッファするサンプル数を取得します。
int __stdcall pxeasy_GetSamplesPerBuffer(void);
ファイルから楽曲データを読み込みます。
int __stdcall pxeasy_Tune_Load(const char* filepath);
読み込まれている楽曲データを開放します。
int __stdcall pxeasy_Tune_Release(void);
読み込まれた楽曲データの演奏を開始します。
int __stdcall pxeasy_Tune_Start( int start_samples, int fadein_milisecond);
再生開始サンプル数を渡すことで、その位置から再生を開始します。「サンプル」とは、PCM WAVE データの最小単位です。秒間サンプルレートから逆算もできますが、pxeasy_Tune_Stop, pxeasy_Tune_Fadeout から停止位置として取得することもできます。
演奏のフェードアウトを開始し、再生サンプル数を取得します。
int __stdcall pxeasy_Tune_Fadeout(int milisecond);
楽曲データの音量を設定します。
void __stdcall pxeasy_Tune_SetVolume( int volume);
楽曲データの演奏を停止し、再生サンプル数を取得します。
int __stdcall pxeasy_Tune_Stop(void);
楽曲データが現在再生中かどうかを取得します。
int __stdcall pxeasy_Tune_IsStreaming(void);
楽曲データのループ再生を設定します。
void __stdcall pxeasy_Tune_SetLoop(int enable);
楽曲データの拍子数を取得します。
int __stdcall pxeasy_Tune_GetBeatNum(void);
楽曲データの BPM を取得します。
int __stdcall pxeasy_Tune_GetBeatTempo(void);
楽曲データのクロック数を取得します。
int __stdcall pxeasy_Tune_GetBeatClock(void);
楽曲の小節数を取得します。pxeasy_Tune_GetPlayMeas と同等です。
int __stdcall pxeasy_Tune_GetMeasNum(void);
楽曲データのリピート小節を取得します。
int __stdcall pxeasy_Tune_GetRepeatMeas(void);
楽曲データの有効演奏小節を取得します。
int __stdcall pxeasy_Tune_GetPlayMeas(void);
楽曲データの名称を取得します。
int __stdcall pxeasy_Tune_CopyName( char* destination, int buffer_bytes);
利用側で文字列の格納先を作成し、そこにコピーします。データコピーだけを行うので、他の言語でも利用できる可能性があります。
楽曲データのコメントを取得します。
int __stdcall pxeasy_Tune_CopyComment( char* destination, int buffer_bytes);
利用側で文字列の格納先を作成し、そこにコピーします。データコピーだけを行うので、他の言語でも利用できる可能性があります。
ピストンノイズから再生可能な音声バッファを生成し、その ID を返します。
int __stdcall pxeasy_Sound_Create( const char* filepath, int channels, int samples_per_second, int bits_per_sample);
pxtone.dll とは異なり、再生可能なサウンドバッファを生成するため、そのまま効果音再生として利用できます。
ピストンコラージュが生成されていないなどの場合は無音が生成されることもあります。再生バッファは DirectSound を利用するため、ピストンコラージュが DirectSound を利用する設定でなければなりません。この関数はエラー時の情報を pxeasy_CopyLastError で取得することができません。
音声バッファを再生します。
int __stdcall pxeasy_Sound_Play( int sound_id, int priority, int looping);
この関数はエラー時の情報を pxeasy_CopyLastError で取得することができません。
音声バッファを停止します。
int __stdcall pxeasy_Sound_Stop(int sound_id);
この関数はエラー時の情報を pxeasy_CopyLastError で取得することができません。
音声バッファを開放します。
void __stdcall pxeasy_Sound_Release(int sound_id);