Linux»·¾³ÏÂÓÃcÓïÑÔдµÄ²¥·ÅwavÎļþµÄС³ÌÐò
#include <unistd.h>
#include <fcntl.h>
#include
<sys/types.h>
#include <sys/ioctl.h>
#include
<stdlib.h>
#include <stdio.h>
#include
<linux/soundcard.h>
/* ÏÂÃæµÄÈý¸ö²ÎÊýÊǸú¾ßÌåÎļþÏà¹ØµÄ£¬ÎļþʲôÑù£¬¾ÍÒªÉèÖóÉʲôÑù */
#define RATE 11025
#define SIZE 16
#define CHANNELS
2 // 1±íʾµ¥ÉùµÀ£¬2ΪÁ¢ÌåÉù
/* ................ */
unsigned char
buf[RATE*SIZE/8]; //bufÀïÃæÕýºÃ·ÅÒ»ÃëÖÓµÄÒôƵ£¬ÏÂÃæµÄ¼Æʱ»¹ÒªÓÃ
int main()
{
int fd;
int wavfd; //wavÎļþµÄÃèÊö·û
int arg; /* ..ioctl..... */
int status; /*
........ */
/* ...... */
fd = open("/dev/dsp",
O_RDWR);
if (fd < 0) {
printf("open of /dev/dsp failed");
exit(1);
}
wavfd = open("a.wav",O_RDONLY);
if (wavfd
< 0) {
printf("open of wav failed");
exit(1);
}
/* .......... */
arg = SIZE;
status = ioctl(fd,
SOUND_PCM_WRITE_BITS, &arg);
if (status == -1)
perror("SOUND_PCM_WRITE_BITS ioctl failed");
if (arg != SIZE)
perror("unable to set sample size");
/* .......... */
arg = CHANNELS;
status = ioctl(fd,
SOUND_PCM_WRITE_CHANNELS, &arg);
if (status == -1)
&nb
Ïà¹ØÎĵµ£º
/bin ´æ·Å×î³£ÓõÄÃüÁî,ËùÓÐÓû§¶¼ÓÐÖ´ÐÐȨÏÞ
/boot ϵͳÒýµ¼Ä¿ ......
ÐǼÊÒëÍõµÄ°²×°
“ÐǼÊÒëÍõ”ÊÇÓÃGtk2¿ª·¢µÄ¿çƽ̨µÄ¹ú¼Ê»¯µÄ´ÊµäÈí¼þ¡£Ëü¾ßÓГͨÅä·ûÆ¥Å䔡¢“Ñ¡ÖÐÇøÈ¡´Ê”¡¢“Ä£ºý²éѯ”µÈÇ¿´ó¹¦ÄÜ¡£±¾ÎÄÖ÷Òª½â˵һÏÂÖ÷³ÌÐòºÍ´Ê¿âµÄ°²×°£»
Ò»¡¢Ê²Ã´ ......
Linux
ÄÚ´æ¹ÜÀí
ÕªÒª
£º±¾ÕÂÊ×ÏÈÒÔÓ¦ÓóÌÐò¿ª·¢ÕߵĽǶÈÉóÊÓ
Linux
µÄ½ø³ÌÄÚ´æ¹ÜÀí£¬ÔÚ´Ë»ù´¡ÉÏÖð²½ÉîÈëµ½ÄÚºËÖÐÌÖÂÛϵͳÎïÀíÄÚ´æ¹ÜÀíºÍÄÚºËÄÚ´æµÄʹÓ÷½·¨¡£Á¦Çó´ÓÍâµ½ÄÚ¡¢Ë®µ½Çþ³ÉµØÒýµ¼ÍøÓÑ·ÖÎö
Linux
µÄÄÚ´æ¹ÜÀíÓëʹÓá£ÔÚ±¾ÕÂ×îºó£¬ÎÒÃǸø³öÒ»¸öÄÚ´æÓ³ÉäµÄʵÀý£¬°ïÖúÍøÓÑÃÇÀí½â
ÄÚºËÄÚ´æ¹ÜÀíÓëÓû§ÄÚ´æ¹ÜÀíÖ ......
ÔÚLinuxÖÐÓÐ7ÖÖÆô¶¯¼¶±ð£¬Ä¬ÈÏÊÇX-Window£¬ÏñÊÇWindowsµÄ´°¿Úģʽ£¬¶øLinuxµÄ²Ù×÷ºÍÅäÖÃÒ»°ãÎÒÃǶ¼²ÉÓÃÊäÈëÃüÁîµÄ·½Ê½À´Íê³É£¬ÏñDOS²Ù×÷ϵͳһÑù£¬ÈçºÎÈÃLinuxÒ»Æô¶¯¾Í½øÈëÕâÖÖģʽÄØ£¿
ÒÔ¹ÜÀíÔ±Éí·Ý½øÈëLinux£¬ÐÞ¸ÄÎļþ£º/etc/inittabÎļþ
ÕÒµ½¡°id:5:initdefault:¡±£¬ÆäÖ ......
Linux + JDK + Tomcat + MySQL + JDBC °²×°ÊÖ¼Ç
Ò»¡¢Red Hat Linux
1.·ÖÇø
| swap & ......