Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (If you dont know how to use vim, I will explain what to do, but these websites might help out: https://coderwall.com/p/adv71w/basic-vim-commands-for-getting-started and https://www.thegeekstuff.com/2009/03/8-essential-vim-editor-navigation-fundamentals/
- "-->" means enter in to the console
- To change the sample rate in Raspberian/Linux we have to change the pulse config file.
- First navigate to /etc/pulse/daemon.conf:
- --> cd /etc/pulse
- We know have to open the file with vim and edit its contents. Because it is a read-only file we access this as a superuser.
- --> sudo vi daemon.conf
- Know we have opened the file using vim we need to navigate to the correct spot in the file.
- To navigate the file we use the following keys:
- k – navigate upwards
- j – navigate downwards
- l – navigate right side
- h – navigate left side
- We want to navigate to the line: "; alternate-sample-rate = 48000"
- Navigate the cursor to the "48000" and press 'x' to remove the string figure by figure.
- Now, make sure the cursor is at the end of the line. So behind the "=".
- After this, we press 'i' to enter text edit mode and enter the value "16000".
- To exit text edit mode we press 'esc'.
- The block of text in which the line you have to edit is in should look like this:
- "
- ; default-sample-format = s16le
- ; default-sample-rate = 44100
- alternate-sample-rate = 16000
- ; default-sample-channels = 2
- ; default-channel-map = front-left,front-right
- "
- Now we save and quit vim.
- Save the file by entering ':w!' and exit vim by entering ':q'
- To be sure the edit worked, print the file's contents and check if the edit is there.
- --> cat daemon.conf
- If the edit is there,
- Congrats you did it!
- Just make sure that you restart pulse once:
- --> pulseaudio -k
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement