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
Ïà¹ØÎĵµ£º
contact me go -> xuqiang.docs@hotmail.com
ARM Linux Boot Sequence
The following traces the Linux boot sequence for ARM-based systems in the 2.6.18 kernel. It looks at just the earliest stages of the boot process, until the generic non-processor-specific start_kernel function is called. The line ......
Õâ¸öDDD°²×°ÁËÒ»ÍíÉÏ£¬¼Ç¼²½ÖèÈçÏ£º
1.ÏÂÔØlesstif-0.93.40.tar.bz2£¨ddd-3.3.11.tar.gz µÄÎĵµÖÐ˵Õâ¸öÎȶ¨ÎÒ¾ÍÓÃÕâ¸öÁË£©´Óhttp://www.ibiblio.org/pub/X11/lesstif/srcdist/·Åµ½/usr/localÏ£¬È»ºóÊÇÈý²¿Çú£º./configure ,make,make install
2.ÏÂÔØddd-3.3.11.tar.gz ´Óhttp://download.chinaunix.net/download/0003 ......
Linux
ÄÚ´æ¹ÜÀí
ÕªÒª
£º±¾ÕÂÊ×ÏÈÒÔÓ¦ÓóÌÐò¿ª·¢ÕߵĽǶÈÉóÊÓ
Linux
µÄ½ø³ÌÄÚ´æ¹ÜÀí£¬ÔÚ´Ë»ù´¡ÉÏÖð²½ÉîÈëµ½ÄÚºËÖÐÌÖÂÛϵͳÎïÀíÄÚ´æ¹ÜÀíºÍÄÚºËÄÚ´æµÄʹÓ÷½·¨¡£Á¦Çó´ÓÍâµ½ÄÚ¡¢Ë®µ½Çþ³ÉµØÒýµ¼ÍøÓÑ·ÖÎö
Linux
µÄÄÚ´æ¹ÜÀíÓëʹÓá£ÔÚ±¾ÕÂ×îºó£¬ÎÒÃǸø³öÒ»¸öÄÚ´æÓ³ÉäµÄʵÀý£¬°ïÖúÍøÓÑÃÇÀí½â
ÄÚºËÄÚ´æ¹ÜÀíÓëÓû§ÄÚ´æ¹ÜÀíÖ ......
A) Shutdown management node and data node
devmysql3# ndb_mgm -e shutdown
devmysql4# ndb_mgm -e shutdown
B) Shutdown MySQL proccess
devmysql3# mysqladmin shutdown
devmysql4# mysqladmin shutdown
devmysql3 ip: 10.130.30.217
devmysql4 ip: 10.130.30.218
rpm -ivh MySQL-Cluster-gpl-storage ......