wonx/sound.c
Hiroaki Sakai 0f43e6d6ee Added interrupt handling. Timer interrupt support.
(UNIXTimer, WWInterrupt, WWTimer, WonxSystem addition)
According to interrupt support, compatibility functions are replaced with UNIXTimer_Pause (), UNIXTimer_Unpause ()
It hung around.
UNIXTimer, WWTimer, WonxSystem's callback functions,
It is necessary to check finely whether there are bugs peculiar to interrupts.
(The setting of the interrupt in the callback function may change, or from the callback function
It is necessary to check whether the callback function is called or not)

Version 0.2 beta - from wonx-b02.tar.gz
2018-03-07 23:05:54 +00:00

114 lines
2.4 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*****************************************************************************/
/* ここから */
/*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "sys/sound.h"
#include "Wonx.h"
/*****************************************************************************/
/* 互換関数の定義 */
/*****************************************************************************/
/*
* Xサーバとの同期の整合性がとれなくなるなどの問題が考えられるので
* 互換関数の内部は UNIXTimer_Pause(), UNIXTimer_Unpause() でくくり,
* タイマ割り込みを一時停止して処理を行うまたunpause するまえに,
* かならず sync するようにする.
*/
/*
* タイマの一時停止の2重解除の問題が出てくるので,
* 互換関数から互換関数を呼んではいけない.
* (一時停止はネストされるが,いちおう)
* 似たような処理をする関数の場合は,必ず static な別関数に処理をまとめ,
* そっちを呼び出すようにすること.
* 引数の表示の問題もあるしね.
*/
void sound_init(void)
{
return;
}
void sound_set_channel(unsigned int flags)
{
return;
}
unsigned int sound_get_channel(void)
{
return (0);
}
void sound_set_output(unsigned int flags)
{
return;
}
unsigned int sound_get_output(void)
{
return (0);
}
void sound_set_wave(int channel, unsigned char * wave)
{
return;
}
void sound_set_pitch(int channel, unsigned int frequency)
{
return;
}
unsigned int sound_get_pitch(int channel)
{
return (0);
}
void sound_set_volume(int channel, unsigned int volume)
{
return;
}
unsigned int sound_get_volume(int channel)
{
return (0);
}
void sound_set_sweep(int sweep, int step)
{
return;
}
unsigned int sound_get_sweep(void)
{
return (0);
}
void sound_set_noise(unsigned int flags)
{
return;
}
unsigned int sound_get_noise(void)
{
return (0);
}
unsigned int sound_get_random(void)
{
return (0);
}
/*****************************************************************************/
/* ここまで */
/*****************************************************************************/
/*****************************************************************************/
/* End of File. */
/*****************************************************************************/