mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-14 06:59:54 -05:00
Add truncate option to PCM file plugin
Addeed a new option "truncate" to indicate the behavior of creating the output file. When it's true (the default), the file is overwritten and truncated at creation. When false, the plugin tries to open a unique file with a number suffix. The global behavior of "file" and "tee" PCMs is defined via defaults.pcm.file_truncate option. You can overwrite it in ~/.asoundrc.
This commit is contained in:
parent
fe8bb13400
commit
3d0dae9099
2 changed files with 51 additions and 4 deletions
|
|
@ -95,6 +95,8 @@ defaults.pcm.iec958.card defaults.pcm.card
|
|||
defaults.pcm.iec958.device defaults.pcm.device
|
||||
defaults.pcm.modem.card defaults.pcm.card
|
||||
defaults.pcm.modem.device defaults.pcm.device
|
||||
# truncate files via file or tee PCM
|
||||
defaults.pcm.file_truncate true
|
||||
defaults.rawmidi.card 0
|
||||
defaults.rawmidi.device 0
|
||||
defaults.rawmidi.subdevice -1
|
||||
|
|
@ -270,6 +272,10 @@ pcm.tee {
|
|||
slave.pcm $SLAVE
|
||||
file $FILE
|
||||
format $FORMAT
|
||||
truncate {
|
||||
@func refer
|
||||
name defaults.pcm.file_truncate
|
||||
}
|
||||
}
|
||||
|
||||
pcm.file {
|
||||
|
|
@ -285,6 +291,10 @@ pcm.file {
|
|||
slave.pcm null
|
||||
file $FILE
|
||||
format $FORMAT
|
||||
truncate {
|
||||
@func refer
|
||||
name defaults.pcm.file_truncate
|
||||
}
|
||||
}
|
||||
|
||||
pcm.null {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue