alsa

Linux下常见命令

…衆ロ難τιáo~ 提交于 2019-12-31 22:48:29
=============安装和登陆命令======================================== Mount:挂载命令。把存储介质指定成系统中的某个目录,比如挂载光驱mount /dev/cdrom把CDROM挂载,可在目录/mnt/cdrom下查看内容。 umount:卸载命令,比如umount /dev/cdrom exit:退出终端命令。 shutdown:关闭 linux 系统,后面可加参数,比如shut down now。 reboot:重新启动 linux 。 halt:挂起系统,但没有关机。 chsh:改变登入系统的shell。 tty:显示终端机连接标准输入设备的文件名称。 =============文件处理命令======================================== ls:显示当前目录内容。加参数路径可以显示指定目录内容,/特定指根目录;加-l显示目录下文件的详细信息诸如权限,加-all显示最详细信息。加|more可分屏显示目录文件信息,enter跟进,shift+page up/down翻页。 find:查找文件。格式为:find . -name "*.java" 或者find . -name \*.java,其中.表示当前目录,-name表示以名字查找,*即是通配符。 rm:删除目录或者文件。加参数

Linux下常见命令

人盡茶涼 提交于 2019-12-31 22:42:25
Linux下常见命令     原文地址: http://www.cnblogs.com/Gaojiecai/archive/2011/11/03/2234888.html =============安装和登陆命令======================================== Mount:挂载命令。把存储介质指定成系统中的某个目录,比如挂载光驱mount /dev/cdrom把CDROM挂载,可在目录/mnt/cdrom下查看内容。 umount:卸载命令,比如umount /dev/cdrom exit:退出终端命令。 shutdown:关闭 linux 系统,后面可加参数,比如shut down now。 reboot:重新启动 linux 。 halt:挂起系统,但没有关机。 chsh:改变登入系统的shell。 tty:显示终端机连接标准输入设备的文件名称。 =============文件处理命令======================================== ls:显示当前目录内容。加参数路径可以显示指定目录内容,/特定指根目录;加-l显示目录下文件的详细信息诸如权限,加-all显示最详细信息。加|more可分屏显示目录文件信息,enter跟进,shift+page up/down翻页。 find:查找文件。格式为:find . -name

alsa-utils 的使用

我与影子孤独终老i 提交于 2019-12-25 22:54:03
ref : https://blog.csdn.net/outstanding_yzq/article/details/8126350 一.alsa-utils介绍 ALSA是kernel中的一个声音驱动程序.它包括alsa核心和其他声卡的驱动. alsa-utils是alsa的一个工具包,里面包含有声卡测试和音频编辑的工具. 二.alsa-utils的安装 1.RPM包方式 Turbolinux 10.5,11版本已经包含有alsa-utils的rpm包,你可以直接安装: # rpm -ivh alsa-utils-xxx.rpm 2.源码包方式 下载地址: http://www.alsa-project.org/main/index.php/Download 源码包安装方法: # tar zxvf alsa-utils-1.0.6.tar.gz # cd alsa-utils-1.0.6 # ./configure # make install 三.alsa-utils工具的使用 alsa-utils包含的工具有: alsactl, aconnect, alsamixer, amidi, amixer, aplay, aplaymidi, arecord, arecordmidi, aseqnet, iecset, speaker-test 1.alsactl的使用

Portaudio Error on Ubuntu and Raspbian

烈酒焚心 提交于 2019-12-24 15:22:09
问题 I recently started to use PortAudio in a C program, but I've got trouble initializing it. The problem lies in the Pa_Initialize() function. Here's my code: #include "portaudio.h" #include <stdio.h> #include <stdlib.h> main() { PaError err; err = Pa_Initialize(); if ( err != paNoError ) goto error; error: Pa_Terminate(); fprintf( stderr, "******* ERROR *******\n" ); fprintf( stderr, "Error number: %d\n", err ); fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) ); return err; } I

Playing multiple wav files using ALSA in C with different volumes

℡╲_俬逩灬. 提交于 2019-12-24 08:19:57
问题 I need to play more than 2 wav files using ALSA library C interface. Each file should be played with different volumes but it should be possible to play them simultaneously. I am using embedded linux on a board with sgtl5000 device. I get only one entry for playback device as pcm0p. Please let me know how to play multiple sounds together with different volumes. Please let me know if you require more details. Thanks in advance 回答1: If the ALSA library has been compiled with the dmix plugin,

Piping output from aplay to arecord in centos

匆匆过客 提交于 2019-12-24 03:25:23
问题 I am trying to automate some tests for a websocket client. This client connects to a server on command and the server is basically a speech to text engine. The client supports audio streaming from a microphone, such that people can record themselves in real time and transmitting it to the engine. I am running the client in a centos VM which does not have a physical sound card so I decided to simulate one using modprobe snd-dummy My plan is to pipe the output of aplay audioFile.raw to the

Piping output from aplay to arecord in centos

半城伤御伤魂 提交于 2019-12-24 03:25:02
问题 I am trying to automate some tests for a websocket client. This client connects to a server on command and the server is basically a speech to text engine. The client supports audio streaming from a microphone, such that people can record themselves in real time and transmitting it to the engine. I am running the client in a centos VM which does not have a physical sound card so I decided to simulate one using modprobe snd-dummy My plan is to pipe the output of aplay audioFile.raw to the

Enumerating capture ALSA devices and capture from them

牧云@^-^@ 提交于 2019-12-24 02:05:03
问题 I am writing a C program where I would like to enumerate all the capture devices in my system (in practice, I know I have three webcams plus the "integrated" microphone), recognize them and start capturing from them all at the same time. I has some success using snd_device_name_hint() to enumerate all PCM devices and then snd_device_name_get_hint() to determine the "IOID" to see if they support capture. But now, how do I open the related device with snd_pcm_open() so that I can capture? I

No sound using fluidsynth and mingus except in shell

♀尐吖头ヾ 提交于 2019-12-24 00:52:41
问题 I am trying to emulate a piano in python using mingus as suggested in this question. I am running Ubuntu 14.04, and have already created an audio group and added myself to it. I am using alsa. I ran the code given in one of the answers to the aforementioned question and it ran fine in shell mode. However, when I wrote a python script and tried to run it, I did not get any sound whatsoever. Here is my code: #!/usr/bin/env python from mingus.midi import fluidsynth DEF_FONT_PATH = '/usr/share

Finding available sound cards on Linux programmatically

耗尽温柔 提交于 2019-12-23 09:27:29
问题 Is there a way to get a list of available sound cards on the system programmatically using asoundlib and C? I want it with the same information as /proc/asound/cards . 回答1: You can iterate over the cards using snd_card_next , starting with a value of -1 to get the 0th card. Here's sample code; compile it with gcc -o countcards countcards.c -lasound : #include <alsa/asoundlib.h> #include <stdio.h> int main() { int totalCards = 0; // No cards found yet int cardNum = -1; // Start with first card