虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

open

  • 其中sound.c 用于录音和回放。其中特别需要注意的是:1。目前声卡似乎不能打开全双工

    其中sound.c 用于录音和回放。其中特别需要注意的是:1。目前声卡似乎不能打开全双工,所以如果fd = open("/dev/dsp", O_RDWR) ,则无法录音和回放。只能分别设置RDONLY和WRONLY。即半双工方式。否则,就是在录音的时候可以听见,但是无法回放。分析下来似乎是IIC总线中只分配了一个通道给声卡,或者是只启用了一个通道,所以无法录音和放音同步进行。解决方法就是分别以RDONLY方式打开进行录音和WRONLY方式打开进行放音。 Sound1.c用于将录音保存在test.wav文件中,并利用cast test.wav > /dev/sound/dsp回放文件。此处需要注意的是,录音频率必须是44100才能正确回放。否则就会出现类似快放的效果。分析应该是cast方式利用了dsp的默认播放频率44100,所以如果录音的时候低于这个频率,这放的时候就会快放。 此外,设置采样率的时候必须设置成16bit,否则会提示出错。原因尚不知道,估计是与声卡有关。

    标签: sound 回放 全双工 声卡

    上传时间: 2013-12-31

    上传用户:cc1

  • What Does the code DO? Sometimes we may desire to hide our file contents from others.One of the poss

    What Does the code DO? Sometimes we may desire to hide our file contents from others.One of the possible way is encrypting these files.Here a simple encryption technique is used(In VB - The same technique can be implemented in "c" also.) Program flow Explained * open the File to be encrypted for Binary Access Read(Say Source File) * open a temparory file where encrypted data is stored for Binary Access Write(Say Destination File) * Loop through the Source File Byte by Byte * For each byte read from the file, Complement the data. (Using Not operator (in C we have to use "~" operator) * Write Complemented Data to Destination File * Delete the Source File * Rename Destination file as Source File(Now Encryption is over)

    标签: Sometimes the contents desire

    上传时间: 2013-12-25

    上传用户:playboys0

  • This C/C++ code example demonstrates porting standard C software to the S60 platform. In this exam

    This C/C++ code example demonstrates porting standard C software to the S60 platform. In this example, an open source FTP library (ftplib and qftp) written in C has been ported to open C. In addition, a simple UI has been written in Symbian C++ to provide a GUI application.

    标签: demonstrates platform standard software

    上传时间: 2014-10-25

    上传用户:cc1

  • mmsv1.2 文档

    mmsv1.2 文档,可以在open mobile alliance free download

    标签: mmsv 1.2 文档

    上传时间: 2015-12-18

    上传用户:trepb001

  • MD5加密算法java代码

    MD5加密算法java代码,欢迎下载,欢迎open

    标签: java MD5 加密算法 代码

    上传时间: 2013-12-01

    上传用户:qunquan

  • 对于单个控件,COMPONET-->INSTALL COMPONENT..-->PAS或DCU文件-->INSTALL。 2.对于带*.DPK文件的控件包,FILE-->OP

    对于单个控件,COMPONET-->INSTALL COMPONENT..-->PAS或DCU文件-->INSTALL。 2.对于带*.DPK文件的控件包,FILE-->open(下拉列表框中选*.DPK)-->INSTALL即可。 3.对于带*.BPL文件的控件包,INSTALL PACKAGES-->ADD-->BPL文件名即可。 4.如果以上INSTALL按钮为失效的话,试试COMPILE按钮。 5.是RUN TIME LIB则在OPTION下的PACKAGES下的RUNTIMEPACKES加之。 如果编译时提示文件找不到的话,一般是控件的安装目录不在DELPHI的LIB目录中, 有两种方法可以解决: 1.反安装的源文件拷入到DELPHI的LIB目录下。 2.或者TOOLS-->ENVIRONMENT OPTIONS中把控件源代码路径加入到DELPHI的LIB目录中即可。

    标签: INSTALL gt COMPONENT COMPONET

    上传时间: 2013-12-25

    上传用户:ljmwh2000

  • 学会对文件的记录锁定

    学会对文件的记录锁定,及解锁。#include <stdio.h> #include <unistd.h> #include <fcntl.h> int main() { int fd int i struct { char name[20] uint ID int age } myrec fd =open("name", O_RDWR|O_CREAT, 0755) if (fd == -1) return -1 printf("Input your name:") scanf("%s", myrec.name) printf("Inpute your ID :") scanf("%d", &myrec.ID) printf("Input your age :") scanf("%d", &myrec.age) lseek(fd, 0,SEEK_END) lockf(fd, 1, 0) write(fd, (void *)&myrec, sizeof(myrec)) lockf(fd, 0 ,0) return 0 } 执行命令cc lock.c –o lock.out Chmod +x lock.out ./lock.out

    标签: 记录

    上传时间: 2016-01-04

    上传用户:亚亚娟娟123

  • Linux 2.4.18 s3c2440 led driver 使用dev-C++撰寫

    Linux 2.4.18 s3c2440 led driver 使用dev-C++撰寫,需要linux 2.4.18 kernel include,編譯完成後產生led module。 insmod main.o //安裝模組 mknod /dev/leds c 221 0 使用方法: int main(int argc, char *argv[]) { int testdev //led test... testdev = open("/dev/QuickMarkLed",O_RDWR) ioctl(testdev, 2, 1) //ioctl(device, led number, open/close) open=1 ioctl(testdev, argv[1][0]- 0 , argv[2][0]- 0 ) //ioctl(device, led number, open/close) open=1 close(testdev) return 0 }

    标签: s3c2440 driver Linux dev-C

    上传时间: 2014-01-01

    上传用户:qlpqlq

  • The Tremor Vorbis I stream and file decoder provides an embeddable, integer-only library [libvorbisi

    The Tremor Vorbis I stream and file decoder provides an embeddable, integer-only library [libvorbisidec] intended for decoding all current and future Vorbis I compliant streams. The Tremor libvorbisidec library exposes an API intended to be as similar as possible to the familiar vorbisfile library included with the open source Vorbis reference libraries distributed for free by Xiph.org. Tremor can be used along with any ANSI compliant stdio implementation for file/stream access, or use custom stream i/o routines provided by the embedded environment. Both uses are described in detail in this documentation.

    标签: integer-only embeddable libvorbisi provides

    上传时间: 2013-12-25

    上传用户:lindor

  • The Tremor Vorbis I stream and file decoder provides an embeddable, integer-only library [libvorbisi

    The Tremor Vorbis I stream and file decoder provides an embeddable, integer-only library [libvorbisidec] intended for decoding all current and future Vorbis I compliant streams. The Tremor libvorbisidec library exposes an API intended to be as similar as possible to the familiar vorbisfile library included with the open source Vorbis reference libraries distributed for free by Xiph.org. ogg vorbis decoder, evc project Tremor can be used along with any ANSI compliant stdio implementation for file/stream access, or use custom stream i/o routines provided by the embedded environment. Both uses are described in detail in this documentation.

    标签: integer-only embeddable libvorbisi provides

    上传时间: 2016-01-21

    上传用户:gengxiaochao