Merge pull request #393 from xournalpp/desktop_install_recording

updated desktop-install to install the audio recording script
presentation
morrolinux 7 years ago committed by GitHub
commit 37cee3c064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      README.md
  2. 2
      desktop/desktop_install.sh.in
  3. 15
      utility/usr/local/bin/xopp-recording.sh

@ -35,7 +35,7 @@ Hopefully you'll enjoy it!
## How to use audio record and playback feature:
- Install `vlc` and make sure `curl` and `arecord` are present on your system
- Copy the script under `utility` folder to its corresponding absolute path
- Make sure you installed xournalpp with `desktop-install` command (see install steps)
- Under `vlc` settings:
- - enable `http interface` (see [this](https://github.com/azrafe7/vlc4youtube/blob/master/instructions/how-to-enable-vlc-web-interface.md) ) with blank username and password "password"
- - tick `Allow only one instance` under `Interface -> Instance`
@ -43,7 +43,9 @@ Hopefully you'll enjoy it!
- Choose `Toolbar Left` layout under `View->Toolbars->Toolbar Left`
You're ready to go!
Just press the red button to start/stop recording and use the `Play Object` tool to click on a stroke and listen to the corresponding audio
Just press the red button to start/stop recording and use the `Play Object` tool to click on a stroke and listen to the corresponding audio.
If you need to, you can edit the recording audio gain in the script under `/usr/local/bin/xopp-recording.sh` (an option for this will be availabe through xournalpp's settings in the future)
## Building

@ -25,6 +25,7 @@ if test "$1" = "install"; then
cp -f ${srcdir}/desktop/x-xopp.desktop /usr/share/mimelnk/application
cp -f ${srcdir}/desktop/xournalpp.thumbnailer /usr/share/thumbnailers
cp -f ${srcdir}/utility/usr/local/bin/xopp-recording.sh /usr/local/bin/
else
rm -f ${desktopdir}/icons/hicolor/scalable/apps/xournalpp.svg
rm -f ${desktopdir}/icons/hicolor/scalable/mimetypes/xoj.svg
@ -38,6 +39,7 @@ else
rm -f ${desktopdir}/applications/xournalpp.desktop
rm -f /usr/share/mimelnk/application/x-xoj.desktop
rm -f /usr/share/thumbnailers/xournalpp.thumbnailer
rm -f /usr/local/bin/xopp-recording.sh
fi
echo "Updating desktop, mime, and icon databases.";

@ -1,24 +1,21 @@
#!/bin/bash
filetype="wav"
#filename="record_$(date +%H_%M_%m_%d_%Y)"
#directory="$HOME/Musica/recordings/"
if [[ $1 == "start" ]] && [[ $# -eq 2 ]]
then
filename=$(echo $2|rev|cut -d'/' -f1|rev)
directory=$(echo $2|rev|cut -d'/' -f2-|rev)
directory=$directory/
vol=35
#exec &> ${directory}${filename}.log #debug
if ! [ -d "$directory" ];
then
mkdir "$directory"
mkdir -p "$directory"
fi
#exec &> ${directory}${filename}.log #debug
notify-send "Recording started"
amixer sset 'Capture' 35%
notify-send "Recording started with ${vol}% gain"
amixer sset 'Capture' ${vol}%
amixer sset 'Master' 0%
arecord -f cd -t wav |lame --preset 56 -mm - "$directory""$filename" &
elif [[ $1 == "stop" ]]

Loading…
Cancel
Save