Linux 마스터 볼륨 조절 .
#include <ioctl.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/soundcard.h>
void VolumeControl( int volume )
{
int fd = 0;
if( ( fd = open( "/dev/mixer", O_RDWR ) ) > 0 )
{
volume |= volume << 8;
ioctl( fd, SOUND_MIXER_WRITE_VOLUME, &volume ); // 볼륨값을 써주는 곳
}
close( fd );
}
#include <ioctl.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/soundcard.h>
void VolumeControl( int volume )
{
int fd = 0;
if( ( fd = open( "/dev/mixer", O_RDWR ) ) > 0 )
{
volume |= volume << 8;
ioctl( fd, SOUND_MIXER_WRITE_VOLUME, &volume ); // 볼륨값을 써주는 곳
}
close( fd );
}