You are not logged in.

#1 2019-05-23 10:58:52

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 363

[SOLVED] cannot record sound from anything played by moc

Hi everybody!

I have PulseAudio installed. I am using audio-recorder from AUR to record sound. It works fine with 'mpv' (both audio files and radio streams) but when I try to record radio stream or audio file played by 'moc' it does not even start recording. On the recording button it shows 'Continue recording' but no sound is being recorder. And in the folder where the recorded files are supposed to be found it produces text files with 0 bytes.

└─>  cat /home/vb/.moc/config
# This is a configuration file for the MOC player.  It should be named
# 'config' and placed in the ~/.moc directory.  As this file can specify
# commands which invoke other applications, MOC will refuse to start if it
# is not owned by either root or the current user, or if it is writable by
# anyone other than its owner.  All options are given with their default
# values, and therefore commented.

ReadTags = no
ShowTime = no
TagsCacheSize = 0


# Comments begin with '#'.
# You can use quotes and escape ('\') in parameters.
#
# You can have variable values substituted by enclosing the variable name
# as "${...}".  (This only applies to the portion of the option following
# the '='.)  Variables are substituted first from the environment then,
# if not found, from the configuration options.  (Note that the value of
# a configuration option substituted is that which it has at the time the
# substitution variable is encountered.)  If there is a naming conflict
# between an environment and configuration variable, you may be able to
# resolve it by using lowercase as the environment variable matches are
# case-sensitive whereas the configuration variables are not.
#
# You can also use the form "${...:-...}" where the value in the second
# position will be substituted if the variable name given in the first
# position is unset or null.
#
# So, for example:
#
#     MusicDir = /music/${USER:-public}
#     Fastdir1 = ${MusicDir}/mp3/rock
#     Fastdir2 = ${MusicDir}/mp3/electronic
#     Fastdir3 = ${MusicDir}/mp3/rap
#     Fastdir4 = ${MusicDir}/mp3/etc
#
# Variable names are limited to those accepted by the BASH shell; that
# is, those comprising the upper- and lowercase ASCII characters, digits
# and the underscore.
#
# If you need to use the "${" sequence for any other purpose, write "$${"
# and it will be replaced by "${" and not treated as a substitution.
#
# Some options take lists of strings as their values.  The strings are
# separated by colons.  Additional strings can be appended to the list
# using "+=" in place of a plain "=" to assign the value.  For an example,
# see the XTerms option.
#
# You can override any configuration option when you run MOC using the
# '-O' command line option:
#
#     mocp -O AutoNext=no -O messagelingertime=1 -O XTerms+=xxt:xwt
#
# This command line option can be repeated as many times as needed and
# the configuration option name is not case sensitive.  (Note that MOC
# does not perform variable substitution on the value of such overridden
# configuration options.)  Most option values are set before the
# configuration file is processed (which allows the new values to be
# picked up by substitutions), however list-valued options are overridden
# afterwards (which gives the choice of whether the configured values are
# replaced or added to).

# Remember that the client and server are separate processes and the
# server will retain the configuration values formed from the environment
# within which it was originally started.

# Show file titles (title, author, album) instead of file names?
#ReadTags = yes

# In which directory do you store your music files?  If you specify it
# you will be able to jump straight to this directory with the '-m'
# parameter or the 'm' command.  This can also point to a playlist.
#
# Example:    MusicDir = "/home/joe/music"
#
#MusicDir =

# Start in the music directory by default?  If set to 'no', start
# in the current directory by default.  A single directory on
# the command line takes precedence.
#StartInMusicDir = no

# How to sort?  FileName is the option's only value for now.
#Sort = FileName

# Show errors in the streams (for example, broken frames in MP3 files)?
#ShowStreamErrors = no

# Ignore CRC errors in MP3 files?  Most players do that, so the default
# value is 'yes'.
#MP3IgnoreCRCErrors = yes

# Set playback toggles.
#Repeat = no
#Shuffle = no
#AutoNext = yes

# Default FormatString:
#
#   %n - Track number
#   %a - Artist
#   %A - Album
#   %t - Title
#   %(X:TRUE:FALSE) - Ternary expression: if X exists, do TRUE,
#                     otherwise FALSE.  The escape character must
#                     be doubled (i.e., '\\').  (See zshmisc
#                     documentation for more information.)
#
#FormatString = "%(n:%n :)%(a:%a - :)%(t:%t:)%(A: \(%A\):)"

# Input and output buffer sizes (in kilobytes).
#InputBuffer = 512                  # Minimum value is 32KB
#OutputBuffer = 512                 # Minimum value is 128KB

# How much to fill the input buffer before playing (in kilobytes)?
# This can't be greater than the value of InputBuffer.  While this has
# a positive effect for network streams, it also causes the broadcast
# audio to be delayed.
#Prebuffering = 64

# Use this HTTP proxy server for internet streams.  If not set, the
# environment variables http_proxy and ALL_PROXY will be used if present.
#
# Format: HTTPProxy = PROXY_NAME:PORT
#
#HTTPProxy =

# Sound driver - OSS, ALSA, JACK, SNDIO (on OpenBSD) or null (only for
# debugging).  You can enter more than one driver as a colon-separated
# list.  The first working driver will be used.
#SoundDriver = JACK:ALSA:OSS

# Jack output settings.
#JackClientName = "moc"
#JackStartServer = no
#JackOutLeft = "system:playback_1"
#JackOutRight = "system:playback_2"

# OSS output settings.
#OSSDevice = /dev/dsp
#OSSMixerDevice = /dev/mixer
#OSSMixerChannel1 = pcm             # 'pcm', 'master' or 'speaker'
#OSSMixerChannel2 = master          # 'pcm', 'master' or 'speaker'

# ALSA output settings.  If you need to dump the audio produced by MOC
# to a file for diagnostic purposes, the following setting of 'ALSADevice'
# should do that:
#
#    ALSADevice=tee:hw,'/tmp/out.wav',wav
#
#ALSADevice = default
#ALSAMixer1 = PCM
#ALSAMixer2 = Master

# Under some circumstances on 32-bit systems, audio played continously
# for long periods of time may begin to stutter.  Setting this option to
# 'yes' will force MOC to avoid ALSA's dmix resampling and prevent this
# stutter.  But it also has other implications:
#
# - You may experience unacceptably high CPU load.
# - ALSA's resampler plug-ins will not be used.
# - The resampling may be of lower quality than ALSA would provide.
# - You may need to try different "ResampleMethod" option settings.
# - The "ForceSampleRate" option may be ineffective.
# - If libsamplerate is not configured, many audios may be unplayable.
#
#ALSAStutterDefeat = no

# Save software mixer state?
# If enabled, a file 'softmixer' will be created in '~/.moc/' storing the
# mixersetting set when the server is shut down.
# Note that there is a "hidden" 'Amplification' setting in that file.
# Amplification (0-200) is used to scale the mixer setting (0-100).  This
# results in a higher signal amplitude but may also produce clipping.
#Softmixer_SaveState = yes

# Save equalizer state?
# If enabled, a file 'equalizer' will be created in '~/.moc/' storing the
# equalizer settings when the server is shut down.
# Note that there is a "hidden" 'Mixin' setting in that file.
# Mixin (0.0-1.0) is used to determine how much of the original signal is
# used after equalizing.  0 means to only use the equalized sound, while 1
# effectively disabled the mixer.  The default is 0.25.
#Equalizer_SaveState = yes

# Show files with dot at the beginning?
#ShowHiddenFiles = no

# Hide file name extensions?
#HideFileExtension = no

# Show file format in menu?
#ShowFormat = yes

# Show file time in menu?  Possible values: 'yes', 'no' and 'IfAvailable'
# (meaning show the time only when it is already known, which often works
# faster).
#ShowTime = IfAvailable

# Show time played as a percentage in the time progress bar.
#ShowTimePercent = no

# Values of the TERM environment variable which are deemed to be managed by
# screen(1).  If you are setting a specific terminal using screen(1)'s
# '-T <term>' option, then you will need to add 'screen.<term>' to this list.
# Note that this is only a partial test; the value of the WINDOW environment
# variable must also be a number (which screen(1) sets).
#ScreenTerms = screen:screen-w:vt100

# Values of the TERM environment variable which are deemed to be xterms.  If
# you are using MOC within screen(1) under an xterm, then add screen(1)'s
# TERM setting here as well to cause MOC to update the xterm's title.
#XTerms = xterm
#XTerms += xterm-colour:xterm-color
#XTerms += xterm-256colour:xterm-256color
#XTerms += rxvt:rxvt-unicode
#XTerms += rxvt-unicode-256colour:rxvt-unicode-256color
#XTerms += eterm

# Theme file to use.  This can be absolute path or relative to
# /usr/share/moc/themes/ (depends on installation prefix) or
# ~/.moc/themes/ .
#
# Example:    Theme = laras_theme
#
#Theme =

# The theme used when running on an xterm.
#
# Example:    XTermTheme = transparent-background
#
#XTermTheme =

# Should MOC try to autoload the default lyrics file for an audio?  (The
# default lyrics file is a text file with the same file name as the audio
# file name with any trailing "extension" removed.)
#AutoLoadLyrics = yes

# MOC directory (where pid file, socket and state files are stored).
# You can use ~ at the beginning.
#MOCDir = ~/.moc

# Use mmap() to read files.  mmap() is much slower on NFS.
#UseMMap = no

# Use MIME to identify audio files.  This can make for slower loading
# of playlists but is more accurate than using "extensions".
#UseMimeMagic = no

# Assume this encoding for ID3 version 1/1.1 tags (MP3 files).  Unlike
# ID3v2, UTF-8 is not used here and MOC can't guess how tags are encoded.
# Another solution is using librcc (see the next option).  This option is
# ignored if UseRCC is set to 'yes'.
#ID3v1TagsEncoding = WINDOWS-1250

# Use librcc to fix ID3 version 1/1.1 tags encoding.
#UseRCC = yes

# Use librcc to filenames and directory names encoding.
#UseRCCForFilesystem = yes

# When this option is set the player assumes that if the encoding of
# ID3v2 is set to ISO-8859-1 then the ID3v1TagsEncoding is actually
# that and applies appropriate conversion.
#EnforceTagsEncoding = no

# Enable the conversion of filenames from the local encoding to UTF-8.
#FileNamesIconv = no

# Enable the conversion of the xterm title from UTF-8 to the local encoding.
#NonUTFXterm = no

# Should MOC precache files to assist gapless playback?
#Precache = yes

# Remember the playlist after exit?
#SavePlaylist = yes

# When using more than one client (interface) at a time, do they share
# the playlist?
#SyncPlaylist = yes

# Choose a keymap file (relative to '~/.moc/' or using an absolute path).
# An annotated example keymap file is included ('keymap.example').
#
# Example:    Keymap = my_keymap
#
#Keymap =

# Use ASCII rather than graphic characters for drawing lines.  This
# helps on some terminals.
#ASCIILines = no

# FastDirs, these allow you to jump directly to a directory, the key
# bindings are in the keymap file.
#
# Examples:   Fastdir1 = /mp3/rock
#             Fastdir2 = /mp3/electronic
#             Fastdir3 = /mp3/rap
#             Fastdir4 = /mp3/etc
#
#Fastdir1 =
#Fastdir2 =
#Fastdir3 =
#Fastdir4 =
#Fastdir5 =
#Fastdir6 =
#Fastdir7 =
#Fastdir8 =
#Fastdir9 =
#Fastdir10 =

# How fast to seek (in number of seconds per keystroke).  The first
# option is for normal seek and the second for silent seek.
#SeekTime = 1
#SilentSeekTime = 5

# PreferredDecoders allows you to specify which decoder should be used
# for any given audio format.  It is a colon-separated list in which
# each entry is of the general form 'code(decoders)', where 'code'
# identifies the audio format and 'decoders' is a comma-separated list
# of decoders in order of preference.
#
# The audio format identifier may be either a filename extension or a
# MIME media type.  If the latter, the format is 'type/subtype' (e.g.,
# 'audio/flac').  Because different systems may give different MIME
# media types, any 'x-' prefix of the subtype is ignored both here and
# in the actual file MIME type (so all combinations of 'audio/flac' and
# 'audio/x-flac' match each other).
#
# For Internet streams the matching is done on MIME media type and on
# actual content.  For files the matches are made on MIME media type
# (if the 'UseMimeMagic' option is set) and on filename extension.  The
# MIME media type of a file is not determined until the first entry for
# MIME is encountered in the list.
#
# The matching is done in the order of appearance in the list with any
# entries added from the command line being matched before those listed
# here.  Therefore, if you place all filename extension entries before
# all MIME entries you will speed up MOC's processing of directories
# (which could be significant for remote file systems).
#
# The decoder list may be empty, in which case no decoders will be used
# for files (and files with that audio format ignored) while Internet
# streams will be assessed on the actual content.  Any decoder position
# may contain an asterisk, in which case any decoder not otherwise listed
# which can handle the audio format will be used.  It is not an error to
# list the same decoder twice, but neither does it make sense to do so.
#
# If you have a mix of audio and non-audio files in your directories, you
# may wish to include entries at top of the list which ignore non-audio
# files by extension.
#
# In summary, the PreferredDecoders option provides fine control over the
# type of matching which is performed (filename extension, MIME media
# type and streamed media content) and which decoder(s) (if any) are used
# based on the option's list entries and their ordering.
#
# Examples:   aac(aac,ffmpeg)             first try FAAD2 for AACs then FFmpeg
#             mp3()                       ignore MP3 files
#             wav(*,sndfile)              use sndfile for WAV as a last resort
#             ogg(vorbis,*):flac(flac,*)  try Xiph decoders first
#             ogg():audio/ogg()           ignore OGG files, and
#                                         force Internet selection by content
#             gz():html()                 ignore some non-audio files
#
# Any unspecified audio formats default to trying all decoders.
# Any unknown (or misspelt) drivers are ignored.
# All names are case insensitive.
# The default setting reflects the historical situation modified by
# the experience of users.
#
#PreferredDecoders  = aac(aac,ffmpeg):m4a(ffmpeg)
#PreferredDecoders += mpc(musepack,*,ffmpeg):mpc8(musepack,*,ffmpeg)
#PreferredDecoders += sid(sidplay2):mus(sidplay2)
#PreferredDecoders += wav(sndfile,*,ffmpeg)
#PreferredDecoders += wv(wavpack,*,ffmpeg)
#PreferredDecoders += audio/aac(aac):audio/aacp(aac):audio/m4a(ffmpeg)
#PreferredDecoders += audio/wav(sndfile,*)

# The following PreferredDecoders attempt to handle the ambiguity surrounding
# container types such as OGG for files.  The first two entries will force
# a local file to the correct decoder (assuming the .ogg file contains Vorbis
# audio), while the MIME media types will cause Internet audio streams to
# be assessed on content (which may be either Vorbis or Speex).
#
#PreferredDecoders += ogg(vorbis,ffmpeg):oga(vorbis,ffmpeg):ogv(ffmpeg)
#PreferredDecoders += opus(ffmpeg)
#PreferredDecoders += spx(speex)
#PreferredDecoders += application/ogg(vorbis):audio/ogg(vorbis)

# Which resampling method to use.  There are a few methods of resampling
# sound supported by libresamplerate.  The default is 'Linear') which is
# also the fastest.  A better description can be found at:
#
#    http://www.mega-nerd.com/libsamplerate/api_misc.html#Converters
#
# but briefly, the following methods are based on bandlimited interpolation
# and are higher quality, but also slower:
#
#    SincBestQuality   - really slow (I know you probably have an xx GHz
#                        processor, but it's still not enough to not see
#                        this in the top output :)  The worst case
#                        Signal-to-Noise Ratio is 97dB.
#    SincMediumQuality - much faster.
#    SincFastest       - the fastest bandlimited interpolation.
#
# And these are lower quality, but much faster methods:
#
#    ZeroOrderHold - really poor quality, but it's really fast.
#    Linear - a bit better and a bit slower.
#
#ResampleMethod = Linear

# Always use this sample rate (in Hz) when opening the audio device (and
# resample the sound if necessary).  When set to 0 the device is opened
# with the file's rate.
#ForceSampleRate = 0

# By default, even if the sound card reports that it can output 24bit samples
# MOC converts 24bit PCM to 16bit.  Setting this option to 'yes' allows MOC
# to use 24bit output.  (The MP3 decoder, for example, uses this format.)
# This is disabled by default because there were reports that it prevents
# MP3 files from playing on some soundcards.
#Allow24bitOutput = no

# Use realtime priority for output buffer thread.  This will prevent gaps
# while playing even with heavy load.  The user who runs MOC must have
# permissions to set such a priority.  This could be dangerous, because it
# is possible that a bug in MOC will freeze your computer.
#UseRealtimePriority = no

# The number of audio files for which MOC will cache tags.  When this limit
# is reached, file tags are discarded on a least recently used basis (with
# one second resolution).  You can disable the cache by giving it a size of
# zero.  Note that if you decrease the cache size below the number of items
# currently in the cache, the number will not decrease immediately (if at
# all).
#TagsCacheSize = 256

# Number items in the playlist.
#PlaylistNumbering = yes

# Main window layouts can be configured.  You can change the position and
# size of the menus (directory and playlist).  You have three layouts and
# can switch between then using the 'l' key (standard mapping).  By default,
# only two layouts are configured.
#
# The format is as follows:
#
#     - Each layout is described as a list of menu entries.
#     - Each menu entry is of the form:
#
#           menu(position_x, position_y, width, height)
#
#       where 'menu' is either 'directory' or 'playlist'.
#     - The parameters define position and size of the menu.  They can
#       be absolute numbers (like 10) or a percentage of the screen size
#       (like 45%).
#     - 'width' and 'height' can have also value of 'FILL' which means
#        fill the screen from the menu's position to the border.
#     - Menus may overlap.
#
# You must describe at least one menu (default is to fill the whole window).
# There must be at least one layout (Layout1) defined; others can be empty.
#
# Example:    Layout1 = playlist(50%,50%,50%,50%)
#             Layout2 = ""
#             Layout3 = ""
#
#             Just one layout, the directory will occupy the whole
#             screen, the playlist will have 1/4 of the screen size
#             and be positioned at lower right corner.  (Note that
#             because the playlist will be hidden by the directory
#             you will have to use the TAB key to make the playlist
#             visible.)
#
# Example:    Layout1 = playlist(0,0,100%,10):directory(0,10,100%,FILL)
#
#             The screen is split into two parts: playlist at the top
#             and the directory menu at the bottom.  Playlist will
#             occupy 10 lines and the directory menu the rest.
#
#Layout1 = directory(0,0,50%,100%):playlist(50%,0,FILL,100%)
#Layout2 = directory(0,0,100%,100%):playlist(0,0,100%,100%)
#Layout3 = ""

# When the song changes, should the menu be scrolled so that the currently
# played file is visible?
#FollowPlayedFile = yes

# What to do if the interface was started and the server is already playing
# something from the playlist?  If CanStartInPlaylist is set to 'yes', the
# interface will switch to the playlist.  When set to 'no' it will start
# from the last directory.
#CanStartInPlaylist = yes

# Executing external commands (1 - 10) invoked with key commands (F1 - F10
# by default).
#
# Some arguments are substituted before executing:
#
#     %f - file path
#     %i - title made from tags
#     %S - start block mark (in seconds)
#     %E - end block mark (in seconds)
#
# Data from tags can also be substituted:
#
#     %t - title
#     %a - album
#     %r - artist
#     %n - track
#     %m - time of the file (in seconds)
#
# The parameters above apply to the currently selected file.  If you change
# them to capital letters, they are taken from the file currently playing.
#
# Programs are run using execv(), not a shell, so you can't do things like
# redirecting the output to a file.  The command string is split using blank
# characters as separators; the first element is the command to be executed
# and the rest are its parameters, so if you use "echo Playing: %I" we run
# program 'echo' (from $PATH) with 2 parameters: the string 'Playing:' and
# the title of the file currently playing.  Even if the title contains
# spaces, it's still one parameter and it's safe if it contains `rm -rf /`.
#
# Examples:   ExecCommand1 = "cp %f /mnt/usb_drive"
#             ExecCommand2 = "/home/joe/now_playing %I"
#
#ExecCommand1 =
#ExecCommand2 =
#ExecCommand3 =
#ExecCommand4 =
#ExecCommand5 =
#ExecCommand6 =
#ExecCommand7 =
#ExecCommand8 =
#ExecCommand9 =
#ExecCommand10 =

# Display the cursor in the line with the selected file.  Some braille
# readers (the Handy Tech modular series ZMU 737, for example) use the
# cursor to focus and can make use of it to present the file line even
# when other fields are changing.
#UseCursorSelection = no

# Set the terminal title when running under xterm.
#SetXtermTitle = yes

# Set the terminal title when running under screen(1).  If MOC can detect
# that it is running under screen(1), then it will set an appropriate
# title (see description of ScreenTerms above).  However, if multiple
# levels of screen management are involved, detection might fail and this
# could cause a screen upset.  In that situation you can use this option
# to force screen titles off.
#SetScreenTitle = yes

# Display full paths instead of just file names in the playlist.
#PlaylistFullPaths = yes

# The following setting describes how block markers are displayed in
# the play time progress bar.  Its value is a string of exactly three
# characters.  The first character is displayed in a position which
# corresponds to the time marked as the start of a block and the last
# character to the time marked as the end of the block.  The middle
# character is displayed instead if both the start and the end of the block
# would fall in the same position (within the resolution of the interface).
# You can turn off the displaying of these block marker positions by using
# three space characters.
#BlockDecorators = "`\"'"

# How long (in seconds) to leave a message displayed on the screen.
# Setting this to a high value allows you to scroll through the messages
# using the 'hide_message' key.  Setting it to zero means you'll have to
# be quick to see any message at all.  Any new messages will be queued up
# and displayed after the current message's linger time expires.
#MessageLingerTime = 3

# Does MOC display a prefix on delayed messages indicating
# the number of queued messages still to be displayed?
#PrefixQueuedMessages = yes

# String to append to the queued message count if any
# error messages are still waiting to be displayed.
#ErrorMessagesQueued = "!"

# Self-describing ModPlug options (with 'yes' or 'no' values).
#ModPlug_Oversampling = yes
#ModPlug_NoiseReduction = yes
#ModPlug_Reverb = no
#ModPlug_MegaBass = no
#ModPlug_Surround = no

# ModPlug resampling mode.
# Valid values are:
#
#     FIR -      8 tap fir filter (extremely high quality)
#     SPLINE -   Cubic spline interpolation (high quality)
#     LINEAR -   Linear interpolation (fast, good quality)
#     NEAREST -  No interpolation (very fast, extremely bad sound quality)
#
#ModPlug_ResamplingMode = FIR

# Other self-describing ModPlug audio characteristic options.
# (Note that the 32 bit sample size seems to be buggy.)
#ModPlug_Channels = 2               # 1 or 2 channels
#ModPlug_Bits = 16                  # 8, 16 or 32 bits
#ModPlug_Frequency = 44100          # 11025, 22050, 44100 or 48000 Hz
#ModPlug_ReverbDepth = 0            # 0 (quiet) to 100 (loud)
#ModPlug_ReverbDelay = 0            # Delay in ms (usually 40-200ms)
#ModPlug_BassAmount = 0             # 0 (quiet) to 100 (loud).
#ModPlug_BassRange = 10             # Cutoff in Hz (10-100).
#ModPlug_SurroundDepth = 0          # Surround level 0(quiet)-100(heavy).
#ModPlug_SurroundDelay = 0          # Surround delay in ms, usually 5-40ms.
#ModPlug_LoopCount = 0              # 0 (never), n (times) or -1 (forever)

# Self-describing TiMidity audio characteristic options.
#TiMidity_Rate = 44100              # Between 8000 and 48000
#TiMidity_Bits = 16                 # 8 or 16
#TiMidity_Channels = 2              # 1 or 2
#TiMidity_Volume = 100              # 0 to 800

# You can setup a TiMidity-Config-File here.
# Leave it unset to use library defaults (/etc/timidity.cfg mostly).
# Setting it to 'yes' also uses the library defaults.
# Set it to 'no' if you don't have any configuration file.
# Otherwise set it to the name of a specific file.
#TiMidity_Config =

# Self-describing SidPlay2 audio characteristic options.
#SidPlay2_DefaultSongLength = 180   # If not in database (in seconds)
#SidPlay2_MinimumSongLength = 0     # Play at least n (in seconds)
#SidPlay2_Frequency = 44100         # 4000 to 48000
#SidPlay2_Bits = 16                 # 8 or 16
#SidPlay2_Optimisation = 0          # 0 (worst quality) to 2 (best quality)

# Set path to a HVSC-compatible database (if not set, database is disabled).
#SidPlay2_Database =

# SidPlay2 playback Mode:
#
#     "M": Mono (best for many SIDs)
#     "S": Stereo
#     "L"/"R": Left / Right
#
#SidPlay2_PlayMode = "M"

# Use start-song information from SID ('yes') or start at first song
# ('no').  Songs before the start-song won't be played.  (Note that this
# option previously took the values 1 and 0; these are now deprecated
# in favour of 'yes' and 'no'.)
#SidPlay2_StartAtStart = yes

# Play sub-tunes.  (Note that this option previously took the values 1
# and 0; these are now deprecated in favour of 'yes' and 'no'.)
#SidPlay2_PlaySubTunes = yes

# Run the OnSongChange command when a new song starts playing.
# Specify the full path (i.e. no leading '~') of an executable to run.
# Arguments will be passed, and you can use the following escapes:
#
#     %a artist
#     %r album
#     %f filename
#     %t title
#     %n track
#     %d file duration in XX:YY form
#     %D file duration, number of seconds
#
# No pipes/redirects can be used directly, but writing a shell script
# can do the job.
#
# Example:    OnSongChange = "/home/jack/.moc/myscript %a %r"
#
#OnSongChange =

# If RepeatSongChange is 'yes' then MOC will execute the command every time
# a song starts playing regardless of whether or not it is just repeating.
# Otherwise the command will only be executed when a different song is
# started.
#RepeatSongChange = no

# Run the OnStop command (full path, no arguments) when MOC changes state
# to stopped (i.e., when user stopped playing or changes a song).
#OnStop = "/home/jack/.moc/myscript_on_stop"

# This option determines which song to play after finishing all the songs
# in the queue.  Setting this to 'yes' causes MOC to play the song which
# follows the song being played before queue playing started. If set to
# 'no', MOC will play the song following the last song in the queue if it
# is in the playlist.  The default is 'yes' because this is the way other
# players usually behave.  (Note that this option previously took the
# values 1 and 0; these are now deprecated in favour of 'yes' and 'no'.)
#QueueNextSongReturn = yes
─>  cat ~/.asoundrc
pcm.!default {
        type hw
        card 0
}

ctl.!default {
        type hw           
        card 0
}
└─>  cat /home/vb/.config/pulse/default.pa
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
load-module module-dbus-protocol
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GSettings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gsettings.so
.nofail
load-module module-gsettings
.fail
.endif


### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

### Make some devices default
#set-default-sink output
#set-default-source input
─>  aplay -lL
null
    Discard all samples (playback) or generate zero samples (capture)
jack
    JACK Audio Connection Kit
pulse
    PulseAudio Sound Server
sysdefault:CARD=PCH
    HDA Intel PCH, 92HD91BXX Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
usbstream:CARD=PCH
    HDA Intel PCH
    USB Stream Output
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: 92HD91BXX Analog [92HD91BXX Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
─>  sudo fuser -v /dev/snd/*
[sudo] password for vb: 
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  vb          613 F.... pulseaudio
                     vb        25351 F.... mocp
/dev/snd/pcmC0D0p:   vb        25351 F...m mocp

Any help is highly appreciated!
Thank you!

Last edited by amaro (2019-05-24 06:18:11)

Offline

#2 2019-05-23 11:21:05

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,415

Re: [SOLVED] cannot record sound from anything played by moc

Your moc output is not being routed through pulse, if the recording utility is relying on pulse to record information that won't work. To fix that, remove your .asoundrc and install pulseaudio-alsa instead, which will ensure that ALSA only applications are being routed over pulseaudio.

Offline

#3 2019-05-23 12:10:47

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 363

Re: [SOLVED] cannot record sound from anything played by moc

Re-installed pulseaudio-alsa

[root@G0 vb]# S pulseaudio-alsa
warning: pulseaudio-alsa-2-4 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) pulseaudio-alsa-2-4

Total Installed Size:  0.01 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                     [####################] 100%
(1/1) checking package integrity                   [####################] 100%
(1/1) loading package files                        [####################] 100%
(1/1) checking for file conflicts                  [####################] 100%
(1/1) checking available disk space                [####################] 100%
:: Processing package changes...
(1/1) reinstalling pulseaudio-alsa 

and removed ~/.asoundrc

Still the same result - audio-recorder produces text file with 0 bytes and the recording button shows 'Continue recording' without recording anything.

Offline

#4 2019-05-23 12:34:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,415

Re: [SOLVED] cannot record sound from anything played by moc

Repost the fuser and aplay -lL output and

pacmd list-sinks
pacmd list-sink-inputs

Offline

#5 2019-05-23 12:50:40

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 363

Re: [SOLVED] cannot record sound from anything played by moc

fuser

─>  fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  vb          613 F.... pulseaudio
                     vb         8046 F.... mocp
/dev/snd/pcmC0D0p:   vb         8046 F...m mocp

aplay

─>  aplay -lL
null
    Discard all samples (playback) or generate zero samples (capture)
jack
    JACK Audio Connection Kit
pulse
    PulseAudio Sound Server
default
    Default ALSA Output (currently PulseAudio Sound Server)
sysdefault:CARD=PCH
    HDA Intel PCH, 92HD91BXX Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, 92HD91BXX Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
usbstream:CARD=PCH
    HDA Intel PCH
    USB Stream Output
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: 92HD91BXX Analog [92HD91BXX Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

pacmd list-sinks

─>  pacmd list-sinks
1 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE
	priority: 9039
	volume: front-left: 26214 /  40% / -23.88 dB,   front-right: 26214 /  40% / -23.88 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
	card: 0 <alsa_card.pci-0000_00_1b.0>
	module: 6
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "92HD91BXX Analog"
		alsa.id = "92HD91BXX Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xc0910000 irq 34"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "1e20"
		device.product.name = "7 Series/C216 Chipset Family High Definition Audio Controller"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "352800"
		device.buffering.fragment_size = "176400"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "Built-in Audio Analog Stereo"
		alsa.mixer_name = "IDT 92HD91BXX"
		alsa.components = "HDA:111d76e0,103c194d,00100303 HDA:80862806,80860101,00100000"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-speakers"
		analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-speaker>

pacmd list-sink-inputs

─>  pacmd list-sink-inputs
0 sink input(s) available.

Offline

#6 2019-05-23 13:15:47

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,415

Re: [SOLVED] cannot record sound from anything played by moc

Default is correct, mocp is still not running over pulse. Did you restart moc between tries? If you did and it still doesn't work, uncomment the ALSADevice = default line in it's config to be sure, you might also want to change the order of sounddrivers that ALSA is tried first. Is there a way to get moc to log which devices it accesses?

Offline

#7 2019-05-23 13:49:30

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 363

Re: [SOLVED] cannot record sound from anything played by moc

Uncommented the 'ALSADevice = default' line and restarted 'moc' to make sure I follow your suggestions. Now the recording works. But the sound now is interrupted/chopped every 1 second. This again affects both audio files and radio streams. I guess there must be something else associated with this issue. What am I missing?

P.S.

V1del wrote:

change the order of sounddrivers that ALSA is tried first

This is unknown territory for me. How to do it?

P.S.S.

Found the 'SoundDriver' line in the config file. Tried with both 'SoundDriver = ALSA:JACK:OSS'
and with 'SoundDriver = JACK:ALSA:OSS'. Still the same interrupted/chopped sound.

Last edited by amaro (2019-05-23 14:01:27)

Offline

#8 2019-05-23 13:58:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,415

Re: [SOLVED] cannot record sound from anything played by moc

If it works now the sounddriver order change I suggested should be irrelevant, what's your output for

pacmd list-sinks
pacmd list-sink-inputs

during playback now? The ALSA -> pulse emulation layer often has timing issues. FWIW what is it that you actually want to do? If this works in mpv, why not simply use that? What are you playing back that you need this to work explicitly in moc?

Offline

#9 2019-05-23 14:08:27

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 363

Re: [SOLVED] cannot record sound from anything played by moc

pacmd list-sink-inputs

─>  pacmd list-sink-inputs
1 sink input(s) available.
    index: 1420
	driver: <protocol-native.c>
	flags: 
	state: RUNNING
	sink: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo>
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 220.67 ms
	requested latency: 15.00 ms
	sample spec: s16le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	resample method: (null)
	module: 9
	client: 130 <ALSA plug-in [mocp]>
	properties:
		media.name = "ALSA Playback"
		application.name = "ALSA plug-in [mocp]"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		application.process.id = "3567"
		application.process.user = "vb"
		application.process.host = "G0"
		application.process.binary = "mocp"
		application.language = "en_US.UTF-8"
		window.x11.display = ":0.0"
		application.process.machine_id = "8f9140bfd7b742b9b4c76912b5db3d9e"
		application.process.session_id = "1"
		module-stream-restore.id = "sink-input-by-application-name:ALSA plug-in [mocp]"

pacmd list-sink

─>  pacmd list-sink
Unknown command: list-sink

Offline

#10 2019-05-24 04:29:39

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] cannot record sound from anything played by moc

amaro wrote:

pacmd list-sink-inputs

pacmd list-sink

─>  pacmd list-sink
Unknown command: list-sink

Because he said "list-sinks"


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#11 2019-05-24 05:54:26

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 363

Re: [SOLVED] cannot record sound from anything played by moc

@Rasi
Good catch! Thank you, Rasi!

Here is the output, while playing a radio stream with moc

pacmd list-sinks

─>  pacmd list-sinks
1 sink(s) available.
  * index: 0
	name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: (none)
	priority: 9039
	volume: front-left: 41943 /  64% / -11.63 dB,   front-right: 41943 /  64% / -11.63 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 12.88 ms
	max request: 2 KiB
	max rewind: 2 KiB
	monitor source: 0
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 2
	configured latency: 14.99 ms; range is 0.50 .. 2000.00 ms
	card: 0 <alsa_card.pci-0000_00_1b.0>
	module: 6
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "92HD91BXX Analog"
		alsa.id = "92HD91BXX Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xc0910000 irq 34"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1b.0"
		sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "1e20"
		device.product.name = "7 Series/C216 Chipset Family High Definition Audio Controller"
		device.form_factor = "internal"
		device.string = "front:0"
		device.buffering.buffer_size = "352800"
		device.buffering.fragment_size = "176400"
		device.access_mode = "mmap+timer"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		device.description = "Built-in Audio Analog Stereo"
		alsa.mixer_name = "IDT 92HD91BXX"
		alsa.components = "HDA:111d76e0,103c194d,00100303 HDA:80862806,80860101,00100000"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-speakers"
		analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "audio-headphones"
	active port: <analog-output-headphones>

pacmd list-sink-inputs

─>  pacmd list-sink-inputs
2 sink input(s) available.
    index: 32
	driver: <protocol-native.c>
	flags: START_CORKED FIX_RATE 
	state: CORKED
	sink: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo>
	volume: front-left: 79299 / 121% / 4.97 dB,   front-right: 79299 / 121% / 4.97 dB
	        balance 0.00
	muted: no
	current latency: 593.47 ms
	requested latency: 40.00 ms
	sample spec: float32le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: copy
	module: 9
	client: 36 <VLC media player (LibVLC 3.0.6)>
	properties:
		media.role = "video"
		media.name = "audio stream"
		application.name = "VLC media player (LibVLC 3.0.6)"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		application.id = "org.VideoLAN.VLC"
		application.version = "3.0.6"
		application.icon_name = "vlc"
		application.language = "en_US.UTF-8"
		application.process.id = "25420"
		application.process.user = "vb"
		application.process.host = "G0"
		application.process.binary = "vlc"
		window.x11.display = ":0"
		application.process.machine_id = "8f9140bfd7b742b9b4c76912b5db3d9e"
		module-stream-restore.id = "sink-input-by-media-role:video"
    index: 242
	driver: <protocol-native.c>
	flags: 
	state: RUNNING
	sink: 0 <alsa_output.pci-0000_00_1b.0.analog-stereo>
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	muted: no
	current latency: 154.01 ms
	requested latency: 14.99 ms
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: (null)
	module: 9
	client: 39 <ALSA plug-in [mocp]>
	properties:
		media.name = "ALSA Playback"
		application.name = "ALSA plug-in [mocp]"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		application.process.id = "25492"
		application.process.user = "vb"
		application.process.host = "G0"
		application.process.binary = "mocp"
		application.language = "en_US.UTF-8"
		window.x11.display = ":0.0"
		application.process.machine_id = "8f9140bfd7b742b9b4c76912b5db3d9e"
		application.process.session_id = "1"
		module-stream-restore.id = "sink-input-by-application-name:ALSA plug-in [mocp]"

The sound is still interrupted/choppy.

Offline

#12 2019-05-24 06:17:11

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 363

Re: [SOLVED] cannot record sound from anything played by moc

Choppy sound solved by editing '~/.config/pulse/default.pa'.

Added 'tsched=0' option

load-module module-udev-detect tsched=0

This turns the timer-based scheduling off.

Solution from https://wiki.archlinux.org/index.php/Pu … _crackling

Thank you, V1del and Rasi!

Offline

#13 2019-05-24 06:43:07

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,415

Re: [SOLVED] cannot record sound from anything played by moc

That is not really a generally good idea to disable this globally just because of of one misbehaving program you are increasing latencies for everything, a better solution would be to add PULSE_LATENCY_MSEC=30 to the moc invocation and/or adjusting it's stream latency in pavucontrol that way you have that contained to one single application.

Offline

#14 2019-05-24 17:26:05

amaro
Member
From: 5.11.1-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 363

Re: [SOLVED] cannot record sound from anything played by moc

Added 'PULSE_LATENCY_MSEC=30' to '~/.moc/config' and disabled the 'tsched=0' option in '~/.config/pulse/default.pa'.

Works fine.

Thank you, V1del!

Offline

Board footer

Powered by FluxBB