Stuff4

June 16, 2020

lisp eq eql equal

  • eq use to compare address of the items. If they are in the same address, then they are eq. eq is used to compare symbol, not string, not number, not list.

  • eql is more general than eq. (eql 'foo 'foo) => t, (eql 3 3) => t, (eql 3 3.0) => nil, different types.. eql compares the addresses of two object. if the two are of the same type, eql compares their value.

  • = is used to compare numbers, including in different types.

  • equal compare the content of tow lists one by one to check if they are same. note: string can be seen as lists. (eql "aa" "aa") => nil, (equal "aa" "aa") => t

  • equalp ignore the case of two strings

linux command line adjust volume

  • pactl -set-sink-volume @DEFAULT-SINK@ 20%
  • pactl -set-sink-volume @DEFAULT_SINK@ +10%
  • pactl -set-sink-volume @DEFAULT_SINK@ -10%
  • pactl list sinks

ALSA (Advanced Linux Sound Architecture)

  • 高级Linux声音架构, 它在Linux系统上提供了音频和MIDI的支持

  • 在2.6内核中,ALSA已经成为默认的声音子系统,用来替换2.4系列的OSS(Open Sound System, 开放声音系统)

  • ALSA主要特征包括:高效的支持从消费类入门级声卡到专业级音频设备所有类型的音频接口,完全模块化的设计,支持对称多处理(SMP)和线程安全,对OSS向后兼容,以及提供了用户空间的alsa-lib库来简化应用程序开发

  • Efficient support for all types of audio interfaces, from consumer sound card to professional multichannel audio interfaces.

  • Fully modularized sound drivers.

  • SMP and thread-safe design.

  • User space library (alsa-lib) to simplify application programming and provide higher level funtionality.

  • Support for the older Open Sound System (OSS) API, providing binary compatibility for most OSS programs.

pulseaudio

  • PulseAudio is a sound server for POSIX and Win32 systems. A sound server is basiclly a proxy for your sound applications. It allows you to do advanced operations on your sound data as it passes between you application and your hardware. Things like transferring the audio to a different machine, changing the sample format or channel count and mixing serveral sounds into one are easily achieved using a sound server.