忘記密碼
 立即註冊
樓主: BYOB

打造終極 HiEnd HTPC - Linux 哇塞!

[複製鏈接]

16

主題

1772

回帖

0

積分

新手上路

四星級會員

舊站積分
6295
舊站發表文章數
1683
發表於 2013-5-8 09:29:21 | 顯示全部樓層
原發表者是 bchsieh
[B]

dmix似乎對聲音的影響不小,
把aplay寫成一個script就不用每次打參數了. [/B]


後來才想到, 寫script太麻煩了,
用alias就好了. []

14

主題

849

回帖

0

積分

新手上路

三星級會員

舊站積分
2319
舊站發表文章數
826
 樓主| 發表於 2013-5-8 09:43:52 | 顯示全部樓層
原發表者是 bchsieh
[B]

上次您說MPD內設定mmap不能播放,
用的是小弟修改過的mpd.
您有試過用原始的mpd設定mmap嗎?

另外, aplay和mpd所使用的alsa播放函式並不相同,
小弟目前是打算自己寫一個簡單的播放程式來做實驗,
弄清楚兩種寫法到底差別在哪裡,
有助於釐清問題.
(當初搞OSS buffer的時候, 也是自己寫了個簡易播放程式, 才弄懂要怎麼改mpd). [/B]

還沒試過用原始的mpd設定mmap, 稍後再來試試看...

請問用用alias要如何寫....[:I]

另請教用 ecasound 如何轉檔, 小弟試了下面的寫法好像不行,

ecasound -c -f:s16,2 -i 01*.wav -f:s32,2 -o 01.wav

16

主題

1772

回帖

0

積分

新手上路

四星級會員

舊站積分
6295
舊站發表文章數
1683
發表於 2013-5-8 10:07:06 | 顯示全部樓層
原發表者是 BYOB
[B]
還沒試過用原始的mpd設定mmap, 稍後再來試試看...

請問用用alias要如何寫....[:I]

另請教用 ecasound 如何轉檔, 小弟試了下面的寫法好像不行,

ecasound -c -f:s16,2 -i 01*.wav -f:s32,2 -o 01.wav [/B]


如果要讓每次執行aplay, 都等於aplay -vMF
那麼就可以把下面這行放進initial file內:
for sh or bash:
alias aplay="aplay -vMF"
for csh or tcsh:
alias aplay "aplay -vMF"

這樣以後只要執行aplay, 就會等於aplay -vMF

ecasound, 輸入檔的格式不用設定, 只要設定輸出檔的格式就好了.
所以請拿掉-f:s16,2試試看.
後面的-f:s32,2也可以改成-f:s32_le,2試試.

0

主題

165

回帖

0

積分

新手上路

二星級會員

舊站積分
171
舊站發表文章數
165
發表於 2013-5-8 14:12:53 | 顯示全部樓層
Guys,

been trying to play around with aplay and interestingly some files can cause xruns but some not. for those files can cause xruns it is reproducible meaning if you try next time it will also shows xruns.

any clue about this?

cheers!!

16

主題

1772

回帖

0

積分

新手上路

四星級會員

舊站積分
6295
舊站發表文章數
1683
發表於 2013-5-8 14:24:20 | 顯示全部樓層
原發表者是 solo16
[B]Guys,

been trying to play around with aplay and interestingly some files can cause xruns but some not. for those files can cause xruns it is reproducible meaning if you try next time it will also shows xruns.

any clue about this?

cheers!! [/B]


solo16兄,

您可以把有xrun和沒有xrun的檔案分別拷貝到另外一個目錄,
再播放看看是不是情況有變化?

0

主題

165

回帖

0

積分

新手上路

二星級會員

舊站積分
171
舊站發表文章數
165
發表於 2013-5-8 14:51:33 | 顯示全部樓層
hi bchsieh,

interestingly moved that file to other folder and yes no xruns... um .....very interesting...


another finding after certain mins / hours of playing the xruns encounter becomes less n less......

i guess my system has some random process or sth that caused xruns right?


cheers!!!

16

主題

1772

回帖

0

積分

新手上路

四星級會員

舊站積分
6295
舊站發表文章數
1683
發表於 2013-5-8 15:00:25 | 顯示全部樓層
原發表者是 solo16
[B]hi bchsieh,

interestingly moved that file to other folder and yes no xruns... um .....very interesting...


another finding after certain mins / hours of playing the xruns encounter becomes less n less......

i guess my system has some random process or sth that caused xruns right?


cheers!!! [/B]


第一種xrun (就是特定檔案在搬移後就變成沒有xrun) 的原因是檔案離散, 通常做defragment就可以降低發生機率.

第二種xrun (就是播放越久xrun越低) 的原因有好幾種可能,
最有可能的原因是在持續播放下, 音效卡和電腦的溫度達到恆定, 使時脈不再飄移.

0

主題

165

回帖

0

積分

新手上路

二星級會員

舊站積分
171
舊站發表文章數
165
發表於 2013-5-8 15:06:52 | 顯示全部樓層
hi bchsieh,

thx for the info!!!

yes i tried again put those files into the ramdisk and use ur command xfs_fsr and play again so far no xruns...been running about 10mins.

btw this is how i assign the aplay with higher priority:

aplay
^Z
chrt -f -p 90 `pgrep aplay`
fg
^C
then play as usual

dunno if this trick works or not....

Thx!

14

主題

849

回帖

0

積分

新手上路

三星級會員

舊站積分
2319
舊站發表文章數
826
 樓主| 發表於 2013-5-8 15:21:18 | 顯示全部樓層
原發表者是 bchsieh
[B]

如果要讓每次執行aplay, 都等於aplay -vMF
那麼就可以把下面這行放進initial file內:
for sh or bash:
alias aplay="aplay -vMF"
for csh or tcsh:
alias aplay "aplay -vMF"

這樣以後只要執行aplay, 就會等於aplay -vMF

ecasound, 輸入檔的格式不用設定, 只要設定輸出檔的格式就好了.
所以請拿掉-f:s16,2試試看.
後面的-f:s32,2也可以改成-f:s32_le,2試試. [/B]

用原始的mpd之後, 就可以設定mmap了, 讚!!

依照bchsieh兄的指示, ecasound 如下改過之後就OK了,

# ecasound -c -i 07*.wav -f:s32_le,2 -o 07.wav

試比較16bit和32bit的差異, 32bit的似乎比較好聽一點...,  但總不能全部都去轉檔成32bit吧!! [|)]

16

主題

1772

回帖

0

積分

新手上路

四星級會員

舊站積分
6295
舊站發表文章數
1683
發表於 2013-5-8 15:37:39 | 顯示全部樓層
原發表者是 BYOB
[B]
用原始的mpd之後, 就可以設定mmap了, 讚!!

依照bchsieh兄的指示, ecasound 如下改過之後就OK了,

# ecasound -c -i 07*.wav -f:s32_le,2 -o 07.wav

試比較16bit和32bit的差異, 32bit的似乎比較好聽一點...,  但總不能全部都去轉檔成32bit吧!! [|)] [/B]


轉檔之後, 您用的是 hw:0,0播放嗎?
轉檔後, aplay應該就可以直接使用hw:0,0播放.
如果用的是hw:0,0播放 (也就是MMAP_COMPLEX模式直播),
應該不會只好一點而已...   [;)]
您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

Archiver|MyAV視聽商情網 test

GMT+8, 2026-11-20 00:16 , Processed in 0.090622 second(s), 41 queries .

Powered by MyAV!

快速回覆 返回頂部 返回列表