moraからハイレゾ音楽をダウンロードした。演奏時間は7分ほどのものだ。聴いてみて少し衝撃を受けた。
ファイル形式はFLAC、サイズ244 Mbyte、96kHzサンプリング/24bit A/D変換というもの。
ここで気になるのは、果してLinuxで96 kHz/24bitのハイレゾが有効なのかと言うこと。
googleに聞くと、USB-DAC基板を作ってしまうなど情報はたくさんあるのだが今ひとつ不明。
仕方がないのでkernel sourceをダウンロードした。
USB-DACをつなぐと「snd_usb_audio」モジュールが組み込まれる。
isih@ishi-Pri-Ser:~/ミュージック$ lsmod
Module Size Used by
snd_usb_audio 153450 1
snd_usbmidi_lib 29215 1 snd_usb_audio
「snd-usb-audio」をキーワードにして、find/grepを繰り返し付属ドキュメントの中の情報にたどり着いた。
ishi@ishi-VirtualBox:/usr/src/linux-source-3.13.0$ vi Documentation/sound/alsa/Audiophile-Usb.txt
3.1 - Default Alsa driver mode
------------------------------
The default behavior of the snd-usb-audio driver is to list the device
capabilities at startup and activate the required mode when required
by the applications: for instance if the user is recording in a
24bit-depth-mode and immediately after wants to switch to a 16bit-depth mode,
the snd-usb-audio module will reconfigure the device on the fly.
Examples:
* playing a S24_3BE encoded raw file to the Ao port
% aplay -D hw:1,0 -c2 -t raw -r48000 -fS24_3BE test.raw
* recording a S24_3BE encoded raw file from the Ai port
% arecord -D hw:1,1 -c2 -t raw -r48000 -fS24_3BE test.raw
* playing a S16_BE encoded raw file to the Do port
% aplay -D hw:1,1 -c2 -t raw -r48000 -fS16_BE test.raw
* playing an ac3 sample file to the Do port
% aplay -D hw:1,2 --channels=6 ac3_S16_BE_encoded_file.raw
対応しているらしいが、「aplay」での再生を試してみることにした。
但し、flacを再生することが出来ないのでwavへ変換する。
flacコマンドでflacファイルをwavへ変換する。
isih@ishi-Pri-Ser:~/ミュージック$ flac -d tttt.flac -otttt.wav
flac 1.3.0, Copyright (C) 2000-2009, 2011-2013 Josh Coalson & Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.
tttt.flac: done
因みに、「-d」はデコード指定。付けないとエンコードになる。
alsaのコマンドラインplayerで再生してみる。
isih@ishi-Pri-Ser:~/ミュージック$ aplay -D hw:2,0 tttt.wav
再生中 WAVE 'tttt.wav' : Signed 24 bit Little Endian in 3bytes, レート 96000 Hz, ステレオ
再生され品質はメッセージのとおり。
と言うことで信用することにした。
「-D hw:2,0」は、aplayのリストデバイスで分かる。
isih@ishi-Pri-Ser:~/ミュージック$ aplay -l
**** ハードウェアデバイス PLAYBACK のリスト ****
・
・
・
カード 2: Amp [USB Headphone Amp.], デバイス 0: USB Audio [USB Audio]
サブデバイス: 1/1
サブデバイス #0: subdevice #0
カード 2: Amp [USB Headphone Amp.], デバイス 1: USB Audio [USB Audio #1]
サブデバイス: 1/1
サブデバイス #0: subdevice #0
flacコマンドはUbuntuソフトウェアセンターから「Free Lossless Audio Codec - コマンドライン版ツール」をインストールした。
aplayは普通に入っていた。
ファイル形式はFLAC、サイズ244 Mbyte、96kHzサンプリング/24bit A/D変換というもの。
ここで気になるのは、果してLinuxで96 kHz/24bitのハイレゾが有効なのかと言うこと。
googleに聞くと、USB-DAC基板を作ってしまうなど情報はたくさんあるのだが今ひとつ不明。
仕方がないのでkernel sourceをダウンロードした。
USB-DACをつなぐと「snd_usb_audio」モジュールが組み込まれる。
isih@ishi-Pri-Ser:~/ミュージック$ lsmod
Module Size Used by
snd_usb_audio 153450 1
snd_usbmidi_lib 29215 1 snd_usb_audio
「snd-usb-audio」をキーワードにして、find/grepを繰り返し付属ドキュメントの中の情報にたどり着いた。
ishi@ishi-VirtualBox:/usr/src/linux-source-3.13.0$ vi Documentation/sound/alsa/Audiophile-Usb.txt
3.1 - Default Alsa driver mode
------------------------------
The default behavior of the snd-usb-audio driver is to list the device
capabilities at startup and activate the required mode when required
by the applications: for instance if the user is recording in a
24bit-depth-mode and immediately after wants to switch to a 16bit-depth mode,
the snd-usb-audio module will reconfigure the device on the fly.
Examples:
* playing a S24_3BE encoded raw file to the Ao port
% aplay -D hw:1,0 -c2 -t raw -r48000 -fS24_3BE test.raw
* recording a S24_3BE encoded raw file from the Ai port
% arecord -D hw:1,1 -c2 -t raw -r48000 -fS24_3BE test.raw
* playing a S16_BE encoded raw file to the Do port
% aplay -D hw:1,1 -c2 -t raw -r48000 -fS16_BE test.raw
* playing an ac3 sample file to the Do port
% aplay -D hw:1,2 --channels=6 ac3_S16_BE_encoded_file.raw
対応しているらしいが、「aplay」での再生を試してみることにした。
但し、flacを再生することが出来ないのでwavへ変換する。
flacコマンドでflacファイルをwavへ変換する。
isih@ishi-Pri-Ser:~/ミュージック$ flac -d tttt.flac -otttt.wav
flac 1.3.0, Copyright (C) 2000-2009, 2011-2013 Josh Coalson & Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.
tttt.flac: done
因みに、「-d」はデコード指定。付けないとエンコードになる。
alsaのコマンドラインplayerで再生してみる。
isih@ishi-Pri-Ser:~/ミュージック$ aplay -D hw:2,0 tttt.wav
再生中 WAVE 'tttt.wav' : Signed 24 bit Little Endian in 3bytes, レート 96000 Hz, ステレオ
再生され品質はメッセージのとおり。
と言うことで信用することにした。
「-D hw:2,0」は、aplayのリストデバイスで分かる。
isih@ishi-Pri-Ser:~/ミュージック$ aplay -l
**** ハードウェアデバイス PLAYBACK のリスト ****
・
・
・
カード 2: Amp [USB Headphone Amp.], デバイス 0: USB Audio [USB Audio]
サブデバイス: 1/1
サブデバイス #0: subdevice #0
カード 2: Amp [USB Headphone Amp.], デバイス 1: USB Audio [USB Audio #1]
サブデバイス: 1/1
サブデバイス #0: subdevice #0
flacコマンドはUbuntuソフトウェアセンターから「Free Lossless Audio Codec - コマンドライン版ツール」をインストールした。
aplayは普通に入っていた。