Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55217ac637 | ||
|
|
059ddc2875 | ||
|
|
83c2019611 | ||
|
|
5325e635c3 | ||
|
|
b069cd61ce | ||
|
|
9c27956414 | ||
|
|
d58a4d8804 | ||
|
|
09fb597af4 | ||
|
|
e9073c88bc | ||
|
|
5552fc110a | ||
|
|
bff016dec8 | ||
|
|
2505c770bb | ||
|
|
cf35a58629 | ||
|
|
53e67bae00 | ||
|
|
ec708aa967 | ||
|
|
85fbffb947 | ||
|
|
5168c50325 | ||
|
|
b8476b742e | ||
|
|
ad3884c8f3 | ||
|
|
01d611db6b | ||
|
|
43f2090b67 | ||
|
|
389405b90d | ||
|
|
3d2020555b | ||
|
|
ceefef8029 | ||
|
|
6de80921d7 | ||
|
|
a3dca970bc | ||
|
|
c8b243f49b | ||
|
|
6b7d833215 | ||
|
|
e7ebca02c7 | ||
|
|
fea7510f09 | ||
|
|
b5fff0e230 | ||
|
|
b31c7fcf07 | ||
|
|
6d9c8c0f3b | ||
|
|
f824b87e3a | ||
|
|
2c19290fab | ||
|
|
138bc79941 | ||
|
|
61c5738582 | ||
|
|
e97bb1dd39 | ||
|
|
5b29142c28 | ||
|
|
49cfbda916 | ||
|
|
1ac0c51744 | ||
|
|
63e8f7e2b1 | ||
|
|
7539791d13 | ||
|
|
4bfb989151 | ||
|
|
77b2261630 | ||
|
|
7f5b2f0a3d | ||
|
|
b5ea738a45 | ||
|
|
7782c3ad38 | ||
|
|
7669a1612f | ||
|
|
ec32ce10fa | ||
|
|
6bce7abc40 | ||
|
|
46c1cbc85f | ||
|
|
93689f758f | ||
|
|
9916febb66 | ||
|
|
b9e33736de | ||
|
|
1adbac9009 | ||
|
|
445bdb69e3 | ||
|
|
f0b6d34b3a | ||
|
|
1b08cc0649 | ||
|
|
4c2bf8982f | ||
|
|
d32377845b | ||
|
|
2ab5b1da0c | ||
|
|
02219d908c | ||
|
|
d80a8436c0 | ||
|
|
11a76c45fc |
@@ -15,7 +15,7 @@ INCLUDE(FindPkgConfig)
|
||||
|
||||
SET(VERSION_MAJOR "1")
|
||||
SET(VERSION_MINOR "0")
|
||||
SET(VERSION_PATCH "0")
|
||||
SET(VERSION_PATCH "2")
|
||||
#SET(VERSION_SUFFIX "")
|
||||
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
||||
IF(VERSION_SUFFIX)
|
||||
@@ -43,6 +43,19 @@ OPTION(WANT_VST "Include VST support" ON)
|
||||
OPTION(WANT_VST_NOWINE "Include partial VST support (without wine)" OFF)
|
||||
OPTION(WANT_WINMM "Include WinMM MIDI support" OFF)
|
||||
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
SET(WANT_ALSA OFF)
|
||||
SET(WANT_PULSEAUDIO OFF)
|
||||
SET(WANT_SWH OFF)
|
||||
SET(WANT_VST OFF)
|
||||
SET(STATUS_ALSA "<not supported on this platform>")
|
||||
SET(STATUS_PULSEAUDIO "<not supported on this platform>")
|
||||
# MacPorts: /opt/local/lib
|
||||
LINK_DIRECTORIES(${LINK_DIRECTORIES} /opt/local/lib)
|
||||
ENDIF(LMMS_BUILD_APPLE)
|
||||
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
SET(WANT_ALSA OFF)
|
||||
SET(WANT_JACK OFF)
|
||||
@@ -307,7 +320,11 @@ CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/lmms.rc.in" "${CMAKE_BINARY_DIR}/lmms.rc")
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc.in" "${CMAKE_BINARY_DIR}/plugins/zynaddsubfx/zynaddsubfx.rc")
|
||||
|
||||
# set compiler flags
|
||||
SET(WERROR_FLAGS "-Wall -Werror -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
|
||||
SET(WERROR_FLAGS "-Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
|
||||
IF(NOT LMMS_BUILD_APPLE)
|
||||
SET(WERROR_FLAGS "${WERROR_FLAGS} -Werror")
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_C_FLAGS "-O2 -g ${WERROR_FLAGS} ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS "-O2 -g -fno-exceptions ${WERROR_FLAGS} ${CMAKE_CXX_FLAGS}")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-DLMMS_DEBUG")
|
||||
|
||||
17877
ChangeLog.old
17877
ChangeLog.old
File diff suppressed because it is too large
Load Diff
2
README
2
README
@@ -1,4 +1,4 @@
|
||||
LMMS 1.0.0
|
||||
LMMS 1.0.2
|
||||
===========
|
||||
|
||||
Copyright (c) 2004-2014 by LMMS developers
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
#
|
||||
|
||||
FIND_PATH(WINE_INCLUDE_DIR windows/windows.h PATH_SUFFIXES wine)
|
||||
FIND_LIBRARY(WINE_LIBRARY NAMES wine)
|
||||
FIND_LIBRARY(WINE_LIBRARY NAMES wine PATH_SUFFIXES wine)
|
||||
FIND_PROGRAM(WINE_CXX NAMES wineg++)
|
||||
|
||||
set(WINE_INCLUDE_DIRS ${WINE_INCLUDE_DIR} )
|
||||
set(WINE_LIBRARIES ${WINE_LIBRARY} )
|
||||
|
||||
BIN
data/dmg_branding.png
Normal file
BIN
data/dmg_branding.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 243 KiB |
BIN
data/lmms.icns
Normal file
BIN
data/lmms.icns
Normal file
Binary file not shown.
BIN
data/locale/pt.qm
Normal file
BIN
data/locale/pt.qm
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
2316
data/locale/ru.ts
2316
data/locale/ru.ts
File diff suppressed because it is too large
Load Diff
139
data/scripts/create_apple_dmg.sh
Executable file
139
data/scripts/create_apple_dmg.sh
Executable file
@@ -0,0 +1,139 @@
|
||||
#!/bin/bash
|
||||
|
||||
# by Andy Maloney
|
||||
# http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/
|
||||
|
||||
# make sure we are in the correct dir when we double-click a .command file
|
||||
dir=${0%/*}
|
||||
if [ -d "$dir" ]; then
|
||||
cd "$dir"
|
||||
fi
|
||||
|
||||
# set up your app name, version number, and background image file name
|
||||
APP_NAME="LMMS"
|
||||
VERSION="1.0.0"
|
||||
DMG_BACKGROUND_IMG="dmg_branding.png"
|
||||
cp $HOME/lmms/data/$DMG_BACKGROUND_IMG .
|
||||
|
||||
# you should not need to change these
|
||||
APP_LOWERCASE=$(echo $APP_NAME|tr '[:upper:]' '[:lower:]')
|
||||
APP_EXE="${APP_NAME}.app/Contents/MacOS/${APP_LOWERCASE}"
|
||||
|
||||
VOL_NAME="${APP_NAME} ${VERSION}" # volume name will be "SuperCoolApp 1.0.0"
|
||||
DMG_TMP="${VOL_NAME}-temp.dmg"
|
||||
DMG_FINAL="${VOL_NAME}.dmg" # final DMG name will be "SuperCoolApp 1.0.0.dmg"
|
||||
STAGING_DIR="./Install" # we copy all our stuff into this dir
|
||||
|
||||
# Check the background image DPI and convert it if it isn't 72x72
|
||||
_BACKGROUND_IMAGE_DPI_H=`sips -g dpiHeight ${DMG_BACKGROUND_IMG} | grep -Eo '[0-9]+\.[0-9]+'`
|
||||
_BACKGROUND_IMAGE_DPI_W=`sips -g dpiWidth ${DMG_BACKGROUND_IMG} | grep -Eo '[0-9]+\.[0-9]+'`
|
||||
|
||||
if [ $(echo " $_BACKGROUND_IMAGE_DPI_H != 72.0 " | bc) -eq 1 -o $(echo " $_BACKGROUND_IMAGE_DPI_W != 72.0 " | bc) -eq 1 ]; then
|
||||
echo "WARNING: The background image's DPI is not 72. This will result in distorted backgrounds on Mac OS X 10.7+."
|
||||
echo " I will convert it to 72 DPI for you."
|
||||
|
||||
_DMG_BACKGROUND_TMP="${DMG_BACKGROUND_IMG%.*}"_dpifix."${DMG_BACKGROUND_IMG##*.}"
|
||||
|
||||
sips -s dpiWidth 72 -s dpiHeight 72 ${DMG_BACKGROUND_IMG} --out ${_DMG_BACKGROUND_TMP}
|
||||
|
||||
DMG_BACKGROUND_IMG="${_DMG_BACKGROUND_TMP}"
|
||||
fi
|
||||
|
||||
# clear out any old data
|
||||
rm -rf "${STAGING_DIR}" "${DMG_TMP}" "${DMG_FINAL}"
|
||||
|
||||
# copy over the stuff we want in the final disk image to our staging dir
|
||||
mkdir -p "${STAGING_DIR}"
|
||||
cp -rpf "${APP_NAME}.app" "${STAGING_DIR}"
|
||||
# ... cp anything else you want in the DMG - documentation, etc.
|
||||
|
||||
pushd "${STAGING_DIR}"
|
||||
|
||||
# strip the executable
|
||||
echo "Stripping ${APP_EXE}..."
|
||||
strip -u -r "${APP_EXE}"
|
||||
|
||||
# compress the executable if we have upx in PATH
|
||||
# UPX: http://upx.sourceforge.net/
|
||||
if hash upx 2>/dev/null; then
|
||||
echo "Compressing (UPX) ${APP_EXE}..."
|
||||
upx -9 "${APP_EXE}"
|
||||
fi
|
||||
|
||||
# ... perform any other stripping/compressing of libs and executables
|
||||
|
||||
popd
|
||||
|
||||
# figure out how big our DMG needs to be
|
||||
# assumes our contents are at least 1M!
|
||||
SIZE=`du -sh "${STAGING_DIR}" | sed 's/\([0-9\.]*\)M\(.*\)/\1/'`
|
||||
SIZE=`echo "${SIZE} + 5.0" | bc | awk '{print int($1+0.5)}'`
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Cannot compute size of staging dir"
|
||||
exit
|
||||
fi
|
||||
|
||||
# create the temp DMG file
|
||||
hdiutil create -srcfolder "${STAGING_DIR}" -volname "${VOL_NAME}" -fs HFS+ \
|
||||
-fsargs "-c c=64,a=16,e=16" -format UDRW -size ${SIZE}M "${DMG_TMP}"
|
||||
|
||||
echo "Created DMG: ${DMG_TMP}"
|
||||
|
||||
# mount it and save the device
|
||||
DEVICE=$(hdiutil attach -readwrite -noverify "${DMG_TMP}" | \
|
||||
egrep '^/dev/' | sed 1q | awk '{print $1}')
|
||||
|
||||
sleep 2
|
||||
|
||||
# add a link to the Applications dir
|
||||
echo "Add link to /Applications"
|
||||
pushd /Volumes/"${VOL_NAME}"
|
||||
ln -s /Applications
|
||||
popd
|
||||
|
||||
# add a background image
|
||||
mkdir /Volumes/"${VOL_NAME}"/.background
|
||||
cp "${DMG_BACKGROUND_IMG}" /Volumes/"${VOL_NAME}"/.background/
|
||||
|
||||
# tell the Finder to resize the window, set the background,
|
||||
# change the icon size, place the icons in the right position, etc.
|
||||
echo '
|
||||
tell application "Finder"
|
||||
tell disk "'${VOL_NAME}'"
|
||||
open
|
||||
set current view of container window to icon view
|
||||
set toolbar visible of container window to false
|
||||
set statusbar visible of container window to false
|
||||
set the bounds of container window to {400, 100, 920, 440}
|
||||
set viewOptions to the icon view options of container window
|
||||
set arrangement of viewOptions to not arranged
|
||||
set icon size of viewOptions to 72
|
||||
set background picture of viewOptions to file ".background:'${DMG_BACKGROUND_IMG}'"
|
||||
set position of item "'${APP_NAME}'.app" of container window to {160, 205}
|
||||
set position of item "Applications" of container window to {360, 205}
|
||||
close
|
||||
open
|
||||
update without registering applications
|
||||
delay 2
|
||||
end tell
|
||||
end tell
|
||||
' | osascript
|
||||
|
||||
sync
|
||||
|
||||
# unmount it
|
||||
hdiutil detach "${DEVICE}"
|
||||
|
||||
# now make the final image a compressed disk image
|
||||
echo "Creating compressed image"
|
||||
hdiutil convert "${DMG_TMP}" -format UDZO -imagekey zlib-level=9 -o "${DMG_FINAL}"
|
||||
|
||||
# clean up
|
||||
rm -rf "${DMG_TMP}"
|
||||
rm -rf "${STAGING_DIR}"
|
||||
rm -rf "${DMG_BACKGROUND_IMG}"
|
||||
|
||||
echo 'Done.'
|
||||
|
||||
exit
|
||||
130
data/scripts/create_apple_installer.sh
Executable file
130
data/scripts/create_apple_installer.sh
Executable file
@@ -0,0 +1,130 @@
|
||||
#!/bin/bash
|
||||
#title :create_applet_installer.sh
|
||||
#description :Creates Apple ".app" bundle for LMMS
|
||||
#author :Tres Finocchiaro
|
||||
#date :20140331
|
||||
#version :1.0
|
||||
#usage :bash create_applet_installer.sh
|
||||
#notes :See also https://github.com/LMMS
|
||||
#notes :Troubleshooting try: export DYLD_PRINT_LIBRARIES=1
|
||||
#requires :deploymacqt
|
||||
#=========================================================================================
|
||||
|
||||
# MacPorts Location
|
||||
MACPORTS=/opt/local
|
||||
|
||||
# LMMS source directory
|
||||
CMAKE_SRC=$HOME/lmms
|
||||
|
||||
# LMMS compiled resources
|
||||
CMAKE_INSTALL=$CMAKE_SRC/target
|
||||
|
||||
# LMMS source build directory
|
||||
CMAKE_BUILD=$CMAKE_SRC/build
|
||||
|
||||
# STK rawwaves directory
|
||||
STK_RAWWAVE=$HOME/stk-*/rawwaves
|
||||
|
||||
|
||||
# Place to create ".app" bundle
|
||||
APP=$HOME/Desktop/LMMS.app
|
||||
|
||||
# MacPorts installs libreadline with wrong permissions
|
||||
LIBREADLINE=$MACPORTS/lib/libreadline.6.2.dylib
|
||||
|
||||
#=========================================================================================
|
||||
|
||||
echo -e "\n\nRunning..."
|
||||
|
||||
# Check for u+w permissions on libreadline
|
||||
_perm=`stat -f "%p" $LIBREADLINE`
|
||||
_perm=${_perm:3:1}
|
||||
if [ ${_perm} != "7" ]
|
||||
then
|
||||
echo -e "\n\n\t\t\t\t***********\n\t\t\t\t* WARNING *\n\t\t\t\t***********"
|
||||
echo -e "File $LIBREADLINE is not marked as user writable."
|
||||
echo -e "This will break macdeployqt's linking process after it is copied."
|
||||
echo -e "A sudo password is required to elevate and fix using chmod u+w."
|
||||
echo -e "\nPLEASE ENTER SUDO PASSWORD:"
|
||||
sudo chmod u+w $MACPORTS/lib/libreadline.6.2.dylib
|
||||
fi
|
||||
|
||||
# Remove any old .app bundles
|
||||
rm -Rf $APP
|
||||
|
||||
# Create new bundle, copy our built code to it
|
||||
mkdir -p $APP
|
||||
cd $CMAKE_INSTALL
|
||||
mkdir $APP/Contents
|
||||
cp -R * $APP/Contents
|
||||
|
||||
# Manually copy STK rawwaves
|
||||
mkdir -p $APP/Contents/share/stk/rawwaves
|
||||
cp $STK_RAWWAVE/*.raw $APP/Contents/share/stk/rawwaves
|
||||
|
||||
# Make all libraries writable for macdeployqt
|
||||
cd $APP
|
||||
find . -type f -print0 | xargs -0 chmod u+w
|
||||
|
||||
# Move lmms binary to the proper location
|
||||
mkdir -p $APP/Contents/MacOS
|
||||
mv $APP/Contents/bin/lmms $APP/Contents/MacOS
|
||||
rmdir $APP/Contents/bin
|
||||
|
||||
# Move libraries to proper locations
|
||||
mkdir -p $APP/Contents/Frameworks
|
||||
mv $APP/Contents/lib/lmms/libZynAddSubFxCore.dylib \
|
||||
$APP/Contents/Frameworks/libZynAddSubFxCore.dylib
|
||||
|
||||
mv $APP/Contents/lib/lmms/RemoteZynAddSubFx \
|
||||
$APP/Contents/MacOS/RemoteZynAddSubFx
|
||||
|
||||
# Fix more Zyn Linking issues
|
||||
# install_name_tool -change $CMAKE_INSTALL/lib/lmms/libZynAddSubFxCore.dylib \
|
||||
# @loader_path/../../Frameworks/libZynAddSubFxCore.dylib \
|
||||
# $APP/Contents/lib/lmms/libzynaddsubfx.so
|
||||
|
||||
install_name_tool -change libZynAddSubFxCore.dylib \
|
||||
@loader_path/../../Frameworks/libZynAddSubFxCore.dylib \
|
||||
$APP/Contents/lib/lmms/libzynaddsubfx.so
|
||||
|
||||
install_name_tool -change $CMAKE_BUILD/plugins/zynaddsubfx/libZynAddSubFxCore.dylib \
|
||||
@loader_path/../../Frameworks/libZynAddSubFxCore.dylib \
|
||||
$APP/Contents/MacOS/RemoteZynAddSubFx
|
||||
|
||||
# Build a list of shared objects in target/lib/lmms
|
||||
for file in $APP/Contents/lib/lmms/*.so; do
|
||||
_executables="$_executables -executable=$APP/Contents/lib/lmms/${file##*/}"
|
||||
done
|
||||
|
||||
# Build a list of shared objects in target/lib/lmms/ladspa
|
||||
for file in $APP/Contents/lib/lmms/ladspa/*.so; do
|
||||
_executables="$_executables -executable=$APP/Contents/lib/lmms/ladspa/${file##*/}"
|
||||
done
|
||||
|
||||
# Additional binaries that require linking
|
||||
_executables="$_executables -executable=$APP/Contents/MacOS/RemoteZynAddSubFx"
|
||||
_executables="$_executables -executable=$APP/Contents/Frameworks/libZynAddSubFxCore.dylib"
|
||||
|
||||
# Build our App Package using "macdeployqt"
|
||||
macdeployqt $APP $_executables
|
||||
|
||||
# OS X Specific Artwork
|
||||
cp $CMAKE_SRC/data/lmms.icns $APP/Contents/Resources/
|
||||
|
||||
# Create "Info.plist" using lmms.icns file, http://iconverticons.com/online/)
|
||||
echo -e "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > "$APP/Contents/Info.plist"
|
||||
echo -e "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\"" >> "$APP/Contents/Info.plist"
|
||||
echo -e "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">" >> "$APP/Contents/Info.plist"
|
||||
echo -e " <plist version=\"1.0\">" >> "$APP/Contents/Info.plist"
|
||||
echo -e " <dict>" >> "$APP/Contents/Info.plist"
|
||||
echo -e " <key>CFBundleIconFile</key>" >> "$APP/Contents/Info.plist"
|
||||
echo -e " <string>lmms.icns</string>" >> "$APP/Contents/Info.plist"
|
||||
echo -e " </dict>" >> "$APP/Contents/Info.plist"
|
||||
echo -e "</plist>" >> "$APP/Contents/Info.plist"
|
||||
|
||||
# Done. Ready to build DMG
|
||||
echo -e "\nFinished.\n\nPlease run \"create_apple_dmg.sh\" from the Desktop to build the installer.\n"
|
||||
echo -e "Note: You can drag/drop it into this terminal window.)\n"
|
||||
cp $CMAKE_SRC/data/scripts/create_apple_dmg.sh $HOME/Desktop/
|
||||
chmod +x $HOME/Desktop/create_apple_dmg.sh
|
||||
@@ -1,6 +1,9 @@
|
||||
/********************
|
||||
* LMMS style sheet *
|
||||
********************/
|
||||
QLabel {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
QWhatsThat {
|
||||
color: black;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ComboBoxModel.h - declaration of class ComboBoxModel
|
||||
*
|
||||
* Copyright (c) 2008-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -38,11 +38,10 @@ class EXPORT ComboBoxModel : public IntModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ComboBoxModel( Model * _parent = NULL,
|
||||
const QString & _display_name = QString(),
|
||||
bool _default_constructed = false ) :
|
||||
IntModel( 0, 0, 0, _parent, _display_name,
|
||||
_default_constructed )
|
||||
ComboBoxModel( Model* parent = NULL,
|
||||
const QString& displayName = QString(),
|
||||
bool isDefaultConstructed = false ) :
|
||||
IntModel( 0, 0, 0, parent, displayName, isDefaultConstructed )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -51,37 +50,38 @@ public:
|
||||
clear();
|
||||
}
|
||||
|
||||
void addItem( const QString & _item, PixmapLoader * _loader = NULL );
|
||||
void addItem( const QString& item, PixmapLoader* loader = NULL );
|
||||
|
||||
void clear();
|
||||
|
||||
int findText( const QString & _txt ) const;
|
||||
int findText( const QString& txt ) const;
|
||||
|
||||
inline QString currentText() const
|
||||
QString currentText() const
|
||||
{
|
||||
return ( size() > 0 && value() < size() ) ? m_items[value()].first : QString();
|
||||
}
|
||||
|
||||
inline const PixmapLoader * currentData() const
|
||||
const PixmapLoader* currentData() const
|
||||
{
|
||||
return m_items[value()].second;
|
||||
}
|
||||
|
||||
inline const QString & itemText( int _i ) const
|
||||
const QString & itemText( int i ) const
|
||||
{
|
||||
return m_items[tLimit<int>( _i, minValue(), maxValue() )].first;
|
||||
return m_items[qBound<int>( minValue(), i, maxValue() )].first;
|
||||
}
|
||||
|
||||
inline const PixmapLoader * itemPixmap( int _i ) const
|
||||
const PixmapLoader* itemPixmap( int i ) const
|
||||
{
|
||||
return m_items[tLimit<int>( _i, minValue(), maxValue() )].second;
|
||||
return m_items[qBound<int>( minValue(), i, maxValue() )].second;
|
||||
}
|
||||
|
||||
inline int size() const
|
||||
int size() const
|
||||
{
|
||||
return m_items.size();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
typedef QPair<QString, PixmapLoader *> Item;
|
||||
|
||||
|
||||
@@ -53,6 +53,9 @@ class PianoRoll : public QWidget, public SerializingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*! \brief Resets settings to default when e.g. creating a new project */
|
||||
void reset();
|
||||
|
||||
void setCurrentPattern( pattern * _new_pattern );
|
||||
|
||||
inline void stopRecording()
|
||||
|
||||
@@ -22,9 +22,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _SAMPLE_BUFFER_H
|
||||
#define _SAMPLE_BUFFER_H
|
||||
#ifndef SAMPLE_BUFFER_H
|
||||
#define SAMPLE_BUFFER_H
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QObject>
|
||||
@@ -99,29 +98,18 @@ public:
|
||||
return m_audioFile;
|
||||
}
|
||||
|
||||
inline f_cnt_t startFrame() const
|
||||
f_cnt_t startFrame() const
|
||||
{
|
||||
return m_startFrame;
|
||||
}
|
||||
|
||||
inline f_cnt_t endFrame() const
|
||||
f_cnt_t endFrame() const
|
||||
{
|
||||
return m_endFrame;
|
||||
}
|
||||
|
||||
void setLoopStartFrame( f_cnt_t _start )
|
||||
{
|
||||
m_varLock.lock();
|
||||
m_loopStartFrame = _start;
|
||||
m_varLock.unlock();
|
||||
}
|
||||
|
||||
void setLoopEndFrame( f_cnt_t _end )
|
||||
{
|
||||
m_varLock.lock();
|
||||
m_loopEndFrame = _end;
|
||||
m_varLock.unlock();
|
||||
}
|
||||
void setLoopStartFrame( f_cnt_t start );
|
||||
void setLoopEndFrame( f_cnt_t end );
|
||||
|
||||
inline f_cnt_t frames() const
|
||||
{
|
||||
@@ -223,13 +211,16 @@ public:
|
||||
public slots:
|
||||
void setAudioFile( const QString & _audio_file );
|
||||
void loadFromBase64( const QString & _data );
|
||||
void setStartFrame( const f_cnt_t _s );
|
||||
void setEndFrame( const f_cnt_t _e );
|
||||
void setStartFrame( f_cnt_t start );
|
||||
void setEndFrame( f_cnt_t end );
|
||||
void setAmplification( float _a );
|
||||
void setReversed( bool _on );
|
||||
|
||||
|
||||
private:
|
||||
/*! Ensures that all settings are sane like end frame > start frame etc. */
|
||||
void sanitizeSettings();
|
||||
|
||||
void update( bool _keep_settings = false );
|
||||
|
||||
void convertIntToFloat ( int_sample_t * & _ibuf, f_cnt_t _frames, int _channels);
|
||||
@@ -273,5 +264,4 @@ signals:
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -210,26 +210,29 @@ public:
|
||||
void loadProject( const QString & _filename );
|
||||
bool guiSaveProject();
|
||||
bool guiSaveProjectAs( const QString & _filename );
|
||||
bool saveProjectFile( const QString & _filename );
|
||||
inline const QString & projectFileName() const
|
||||
bool saveProjectFile( const QString & _filename );
|
||||
|
||||
const QString & projectFileName() const
|
||||
{
|
||||
return m_fileName;
|
||||
}
|
||||
inline bool isLoadingProject() const
|
||||
|
||||
bool isLoadingProject() const
|
||||
{
|
||||
return m_loadingProject;
|
||||
}
|
||||
inline bool isModified() const
|
||||
|
||||
bool isModified() const
|
||||
{
|
||||
return m_modified;
|
||||
}
|
||||
|
||||
inline virtual QString nodeName() const
|
||||
virtual QString nodeName() const
|
||||
{
|
||||
return "song";
|
||||
}
|
||||
|
||||
virtual inline bool fixedTCOs() const
|
||||
virtual bool fixedTCOs() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -274,8 +277,6 @@ public slots:
|
||||
|
||||
void addBBTrack();
|
||||
|
||||
bool isLoadingProject();
|
||||
|
||||
|
||||
private slots:
|
||||
void insertBar();
|
||||
|
||||
@@ -2,7 +2,7 @@ lmmsicon ICON data/lmms.ico
|
||||
#include <windows.h>
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,0
|
||||
FILEVERSION 1,0,2,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
|
||||
@@ -12,8 +12,10 @@ ADD_SUBDIRECTORY(LadspaEffect)
|
||||
ADD_SUBDIRECTORY(lb302)
|
||||
#ADD_SUBDIRECTORY(lb303)
|
||||
ADD_SUBDIRECTORY(midi_import)
|
||||
IF(NOT LMMS_BUILD_APPLE)
|
||||
ADD_SUBDIRECTORY(opl2)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(organic)
|
||||
ADD_SUBDIRECTORY(opl2)
|
||||
ADD_SUBDIRECTORY(papu)
|
||||
ADD_SUBDIRECTORY(patman)
|
||||
ADD_SUBDIRECTORY(peak_controller_effect)
|
||||
|
||||
@@ -8,9 +8,9 @@ INSTALL(TARGETS calf LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa")
|
||||
SET_TARGET_PROPERTIES(calf PROPERTIES PREFIX "")
|
||||
SET(INLINE_FLAGS "")
|
||||
IF(NOT LMMS_BUILD_APPLE)
|
||||
SET(INLINE_FLAGS "-finline-functions-called-once")
|
||||
SET(INLINE_FLAGS "-finline-functions-called-once -finline-limit=80")
|
||||
ENDIF(NOT LMMS_BUILD_APPLE)
|
||||
SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 -finline-limit=80 -finline-functions ${INLINE_FLAGS}")
|
||||
SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 -finline-functions ${INLINE_FLAGS}")
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
ADD_CUSTOM_COMMAND(TARGET calf POST_BUILD COMMAND "${STRIP}" "\"${CMAKE_CURRENT_BINARY_DIR}/calf.dll\"")
|
||||
|
||||
@@ -153,7 +153,7 @@ void copy_buf(T &dest_buf, const U &src_buf, T scale = 1, T add = 0) {
|
||||
typedef typename T::data_type data_type;
|
||||
data_type *dest = dest_buf.data();
|
||||
const data_type *src = src_buf.data();
|
||||
int size = src.size();
|
||||
int size = src_buf.size();
|
||||
for (int i=0; i<size; i++)
|
||||
*dest++ = (*src++) * scale + add;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
}
|
||||
|
||||
template<class U, int UseBits>
|
||||
inline U lerp_table_lookup_int(U data[(1<<IntBits)+1]) const {
|
||||
inline U lerp_table_lookup_int(U data[(unsigned int)(1<<IntBits)+1]) const {
|
||||
unsigned int pos = uipart();
|
||||
return lerp_by_fract_int<U, UseBits>(data[pos], data[pos+1]);
|
||||
}
|
||||
@@ -224,19 +224,19 @@ public:
|
||||
/// Untested... I've started it to get a sin/cos readout for rotaryorgan, but decided to use table-less solution instead
|
||||
/// Do not assume it works, because it most probably doesn't
|
||||
template<class U, int UseBits>
|
||||
inline U lerp_table_lookup_int_shift(U data[(1<<IntBits)+1], unsigned int shift) {
|
||||
inline U lerp_table_lookup_int_shift(U data[(unsigned int)(1<<IntBits)+1], unsigned int shift) {
|
||||
unsigned int pos = (uipart() + shift) & ((1 << IntBits) - 1);
|
||||
return lerp_by_fract_int<U, UseBits>(data[pos], data[pos+1]);
|
||||
}
|
||||
|
||||
template<class U>
|
||||
inline U lerp_table_lookup_float(U data[(1<<IntBits)+1]) const {
|
||||
inline U lerp_table_lookup_float(U data[(unsigned int)(1<<IntBits)+1]) const {
|
||||
unsigned int pos = uipart();
|
||||
return data[pos] + (data[pos+1]-data[pos]) * fpart_as_double();
|
||||
}
|
||||
|
||||
template<class U>
|
||||
inline U lerp_table_lookup_float_mask(U data[(1<<IntBits)+1], unsigned int mask) const {
|
||||
inline U lerp_table_lookup_float_mask(U data[(unsigned int)(1<<IntBits)+1], unsigned int mask) const {
|
||||
unsigned int pos = ui64part() & mask;
|
||||
// printf("full = %lld pos = %d + %f\n", value, pos, fpart_as_double());
|
||||
return data[pos] + (data[pos+1]-data[pos]) * fpart_as_double();
|
||||
|
||||
@@ -70,7 +70,7 @@ seed()
|
||||
extern "C" {
|
||||
|
||||
__attribute__ ((constructor))
|
||||
void _init()
|
||||
void caps_so_init()
|
||||
{
|
||||
DescriptorStub ** d = descriptors;
|
||||
|
||||
@@ -126,7 +126,7 @@ void _init()
|
||||
}
|
||||
|
||||
__attribute__ ((destructor))
|
||||
void _fini()
|
||||
void caps_so_fini()
|
||||
{
|
||||
for (ulong i = 0; i < N; ++i)
|
||||
delete descriptors[i];
|
||||
|
||||
@@ -233,10 +233,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
int i;
|
||||
char ** port_names;
|
||||
@@ -341,9 +341,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -436,10 +436,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -575,9 +575,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(stereo_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -349,10 +349,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
int i;
|
||||
char ** port_names;
|
||||
@@ -471,9 +471,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -574,10 +574,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -717,9 +717,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(stereo_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -516,10 +516,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -646,9 +646,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -696,10 +696,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -857,9 +857,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(stereo_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -436,10 +436,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -607,9 +607,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(stereo_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -494,7 +494,7 @@ run_adding_eq(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
|
||||
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
char **port_names;
|
||||
LADSPA_PortDescriptor *port_descriptors;
|
||||
@@ -765,7 +765,7 @@ __attribute__((constructor)) _init() {
|
||||
|
||||
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
|
||||
if (eqDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)eqDescriptor->PortDescriptors);
|
||||
|
||||
@@ -596,7 +596,7 @@ run_adding_eq(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
|
||||
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
char **port_names;
|
||||
LADSPA_PortDescriptor *port_descriptors;
|
||||
@@ -955,7 +955,7 @@ __attribute__((constructor)) _init() {
|
||||
|
||||
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
|
||||
if (eqDescriptor) {
|
||||
free((LADSPA_PortDescriptor *)eqDescriptor->PortDescriptors);
|
||||
|
||||
@@ -324,10 +324,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -423,9 +423,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -225,10 +225,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -325,9 +325,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -418,10 +418,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
int i;
|
||||
char ** port_names;
|
||||
@@ -536,9 +536,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -378,10 +378,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
int i;
|
||||
char ** port_names;
|
||||
@@ -480,9 +480,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -665,10 +665,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -815,9 +815,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(stereo_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -624,10 +624,10 @@ LADSPA_Descriptor * stereo_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
int i;
|
||||
char ** port_names;
|
||||
@@ -748,9 +748,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(stereo_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -228,10 +228,10 @@ cleanup_Sigmoid(LADSPA_Handle Instance) {
|
||||
LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -318,9 +318,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -220,10 +220,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -323,9 +323,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -381,10 +381,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
char ** port_names;
|
||||
LADSPA_PortDescriptor * port_descriptors;
|
||||
@@ -471,9 +471,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -308,10 +308,10 @@ LADSPA_Descriptor * mono_descriptor = NULL;
|
||||
|
||||
|
||||
|
||||
/* __attribute__((constructor)) _init() is called automatically when the plugin library is first
|
||||
/* __attribute__((constructor)) tap_init() is called automatically when the plugin library is first
|
||||
loaded. */
|
||||
void
|
||||
__attribute__((constructor)) _init() {
|
||||
__attribute__((constructor)) tap_init() {
|
||||
|
||||
int i;
|
||||
char ** port_names;
|
||||
@@ -425,9 +425,9 @@ delete_descriptor(LADSPA_Descriptor * descriptor) {
|
||||
}
|
||||
|
||||
|
||||
/* __attribute__((destructor)) _fini() is called automatically when the library is unloaded. */
|
||||
/* __attribute__((destructor)) tap_fini() is called automatically when the library is unloaded. */
|
||||
void
|
||||
__attribute__((destructor)) _fini() {
|
||||
__attribute__((destructor)) tap_fini() {
|
||||
delete_descriptor(mono_descriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <math.h>
|
||||
#include "embed.cpp"
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
#if defined (LMMS_BUILD_WIN32) || defined (LMMS_BUILD_APPLE)
|
||||
#ifndef isnanf
|
||||
#define isnanf(x) isnan(x)
|
||||
#endif
|
||||
|
||||
@@ -980,6 +980,7 @@ if( p.currentEffectChannel <= NumFxChannels )
|
||||
|
||||
case FLP_LayerChans:
|
||||
p.channels[data].layerParent = cur_channel;
|
||||
break;
|
||||
|
||||
// DWORD EVENTS
|
||||
case FLP_Color:
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define INLINE __inline
|
||||
#define INLINE static inline
|
||||
#define HAS_YM3812 1
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
//#include "driver.h" /* use M.A.M.E. */
|
||||
/* #include "driver.h" */ /* use M.A.M.E. */
|
||||
#include "fmopl.h"
|
||||
|
||||
#ifndef PI
|
||||
@@ -236,10 +236,10 @@ INT32 feedback2; /* connect for SLOT 2 */
|
||||
#define LOG_WAR 2 /* WARNING */
|
||||
#define LOG_INF 1 /* INFORMATION */
|
||||
|
||||
//#define LOG_LEVEL LOG_INF
|
||||
/* #define LOG_LEVEL LOG_INF */
|
||||
#define LOG_LEVEL LOG_ERR
|
||||
|
||||
//#define LOG(n,x) if( (n)>=LOG_LEVEL ) logerror x
|
||||
/* #define LOG(n,x) if( (n)>=LOG_LEVEL ) logerror x */
|
||||
#define LOG(n,x)
|
||||
|
||||
/* --------------------- subroutines --------------------- */
|
||||
@@ -313,7 +313,7 @@ INLINE void OPL_KEYOFF(OPL_SLOT *SLOT)
|
||||
/* set envelope counter from envleope output */
|
||||
SLOT->evm = ENV_MOD_RR;
|
||||
if( !(SLOT->evc&EG_DST) )
|
||||
//SLOT->evc = (ENV_CURVE[SLOT->evc>>ENV_BITS]<<ENV_BITS) + EG_DST;
|
||||
/* SLOT->evc = (ENV_CURVE[SLOT->evc>>ENV_BITS]<<ENV_BITS) + EG_DST; */
|
||||
SLOT->evc = EG_DST;
|
||||
SLOT->eve = EG_DED;
|
||||
SLOT->evs = SLOT->evsr;
|
||||
@@ -545,10 +545,10 @@ INLINE void OPL_CALC_RH( OPL_CH *CH )
|
||||
outd[0] += OP_OUT(SLOT,env_out, feedback2)*2;
|
||||
}
|
||||
|
||||
// SD (17) = mul14[fnum7] + white noise
|
||||
// TAM (15) = mul15[fnum8]
|
||||
// TOP (18) = fnum6(mul18[fnum8]+whitenoise)
|
||||
// HH (14) = fnum7(mul18[fnum8]+whitenoise) + white noise
|
||||
/* SD (17) = mul14[fnum7] + white noise
|
||||
TAM (15) = mul15[fnum8]
|
||||
TOP (18) = fnum6(mul18[fnum8]+whitenoise)
|
||||
HH (14) = fnum7(mul18[fnum8]+whitenoise) + white noise */
|
||||
env_sd =OPL_CALC_SLOT(SLOT7_2) + whitenoise;
|
||||
env_tam=OPL_CALC_SLOT(SLOT8_1);
|
||||
env_top=OPL_CALC_SLOT(SLOT8_2);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
/* --- select emulation chips --- */
|
||||
#define BUILD_YM3812 (HAS_YM3812)
|
||||
//#define BUILD_YM3526 (HAS_YM3526)
|
||||
//#define BUILD_Y8950 (HAS_Y8950)
|
||||
/* #define BUILD_YM3526 (HAS_YM3526) */
|
||||
/* #define BUILD_Y8950 (HAS_Y8950) */
|
||||
|
||||
/* --- system optimize --- */
|
||||
/* select bit size of output : 8 or 16 */
|
||||
|
||||
@@ -26,7 +26,7 @@ IF(LMMS_HOST_X86_64)
|
||||
SET(EXTRA_FLAGS -m32)
|
||||
|
||||
# workaround for broken wineg++ in WINE 1.4 (shipped e.g. with Ubuntu Precise)
|
||||
EXEC_PROGRAM( wineg++ ARGS "-v -m32 /dev/zero" OUTPUT_VARIABLE WINEBUILD_OUTPUT)
|
||||
EXEC_PROGRAM( ${WINE_CXX} ARGS "-v -m32 /dev/zero" OUTPUT_VARIABLE WINEBUILD_OUTPUT)
|
||||
if("${WINEBUILD_OUTPUT}" MATCHES ".*x86_64-linux-gnu/wine/libwinecrt0.a.*")
|
||||
SET(EXTRA_FLAGS ${EXTRA_FLAGS} -nodefaultlibs /usr/lib/i386-linux-gnu/wine/libwinecrt0.a -luser32 -lkernel32 -lgdi32)
|
||||
ENDIF()
|
||||
@@ -34,7 +34,7 @@ ENDIF(LMMS_HOST_X86_64)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp"
|
||||
COMMAND wineg++
|
||||
COMMAND ${WINE_CXX}
|
||||
ARGS "-I\"${CMAKE_BINARY_DIR}\"" "-I\"${CMAKE_SOURCE_DIR}/include\"" "-I\"${CMAKE_INSTALL_PREFIX}/include/wine/windows\"" "-I\"${CMAKE_INSTALL_PREFIX}/include\"" -I/usr/include/wine/windows "\"${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp\"" -mwindows -lpthread ${EXTRA_FLAGS} -o RemoteVstPlugin
|
||||
COMMAND find -name RemoteVstPlugin.exe -exec mv "'{}'" RemoteVstPlugin "';'"
|
||||
TARGET vstbase
|
||||
|
||||
@@ -427,6 +427,7 @@ RemoteVstPlugin::~RemoteVstPlugin()
|
||||
m_window = NULL;
|
||||
}
|
||||
pluginDispatch( effMainsChanged, 0, 0 );
|
||||
pluginDispatch( effClose );
|
||||
#ifndef USE_QT_SHMEM
|
||||
// detach shared memory segment
|
||||
if( shmdt( m_vstSyncData ) == -1)
|
||||
|
||||
@@ -24,7 +24,12 @@
|
||||
|
||||
#include "lmmsconfig.h"
|
||||
|
||||
#ifndef LMMS_BUILD_APPLE
|
||||
#include <Qt/QtXml>
|
||||
#endif
|
||||
#ifdef LMMS_BUILD_APPLE
|
||||
#include <QtXml>
|
||||
#endif
|
||||
#include <QtCore/QTemporaryFile>
|
||||
#include <QtGui/QDropEvent>
|
||||
#include <QtGui/QGridLayout>
|
||||
|
||||
@@ -67,7 +67,7 @@ void Alienwah::out(const Stereo<float *> &smp)
|
||||
tmp = clfol * x + oldclfol * x1;
|
||||
|
||||
out = tmp * oldl[oldk];
|
||||
out.real() += (1 - fabs(fb)) * smp.l[i] * (1.0 - panning);
|
||||
out += (1 - fabs(fb)) * smp.l[i] * (1.0 - panning);
|
||||
|
||||
oldl[oldk] = out;
|
||||
REALTYPE l = out.real() * 10.0 * (fb + 0.1);
|
||||
@@ -76,7 +76,7 @@ void Alienwah::out(const Stereo<float *> &smp)
|
||||
tmp = clfor * x + oldclfor * x1;
|
||||
|
||||
out = tmp * oldr[oldk];
|
||||
out.real() += (1 - fabs(fb)) * smp.r[i] * (1.0 - panning);
|
||||
out += (1 - fabs(fb)) * smp.r[i] * (1.0 - panning);
|
||||
|
||||
oldr[oldk] = out;
|
||||
REALTYPE r = out.real() * 10.0 * (fb + 0.1);
|
||||
|
||||
@@ -555,7 +555,7 @@ void PADnoteParameters::applyparameters(bool lockmutex)
|
||||
{
|
||||
const int samplesize = (((int) 1) << (Pquality.samplesize + 14));
|
||||
int spectrumsize = samplesize / 2;
|
||||
REALTYPE spectrum[spectrumsize];
|
||||
REALTYPE *spectrum = new REALTYPE[spectrumsize];
|
||||
int profilesize = 512;
|
||||
REALTYPE profile[profilesize];
|
||||
|
||||
@@ -653,6 +653,8 @@ void PADnoteParameters::applyparameters(bool lockmutex)
|
||||
delete (fft);
|
||||
deleteFFTFREQS(&fftfreqs);
|
||||
|
||||
delete[] spectrum;
|
||||
|
||||
//delete the additional samples that might exists and are not useful
|
||||
if(lockmutex) {
|
||||
pthread_mutex_lock(mutex);
|
||||
|
||||
@@ -445,10 +445,10 @@ float AutomatableModel::controllerValue( int frameOffset ) const
|
||||
AutomatableModel* lm = m_linkedModels.first();
|
||||
if( lm->controllerConnection() )
|
||||
{
|
||||
return lm->controllerValue( frameOffset );
|
||||
return fittedValue( lm->controllerValue( frameOffset ) );
|
||||
}
|
||||
|
||||
return lm->m_value;
|
||||
return fittedValue( lm->m_value );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* ComboBoxModel.cpp - implementation of ComboBoxModel
|
||||
*
|
||||
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -27,9 +27,9 @@
|
||||
|
||||
|
||||
|
||||
void ComboBoxModel::addItem( const QString & _item, PixmapLoader * _pl )
|
||||
void ComboBoxModel::addItem( const QString& item, PixmapLoader* loader )
|
||||
{
|
||||
m_items.push_back( qMakePair( _item, _pl ) );
|
||||
m_items.push_back( qMakePair( item, loader ) );
|
||||
setRange( 0, m_items.size() - 1 );
|
||||
}
|
||||
|
||||
@@ -39,23 +39,24 @@ void ComboBoxModel::addItem( const QString & _item, PixmapLoader * _pl )
|
||||
void ComboBoxModel::clear()
|
||||
{
|
||||
setRange( 0, 0 );
|
||||
foreach( const Item & _i, m_items )
|
||||
foreach( const Item& i, m_items )
|
||||
{
|
||||
delete _i.second;
|
||||
delete i.second;
|
||||
}
|
||||
|
||||
m_items.clear();
|
||||
|
||||
emit propertiesChanged();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int ComboBoxModel::findText( const QString & _txt ) const
|
||||
int ComboBoxModel::findText( const QString& txt ) const
|
||||
{
|
||||
for( QVector<Item>::ConstIterator it = m_items.begin();
|
||||
it != m_items.end(); ++it )
|
||||
for( QVector<Item>::ConstIterator it = m_items.begin(); it != m_items.end(); ++it )
|
||||
{
|
||||
if( ( *it ).first == _txt )
|
||||
if( ( *it ).first == txt )
|
||||
{
|
||||
return it - m_items.begin();
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cfloat>
|
||||
|
||||
#include "Effect.h"
|
||||
#include "engine.h"
|
||||
@@ -135,7 +136,7 @@ void Effect::checkGate( double _out_sum )
|
||||
{
|
||||
// Check whether we need to continue processing input. Restart the
|
||||
// counter if the threshold has been exceeded.
|
||||
if( _out_sum <= gate()+0.000001 )
|
||||
if( _out_sum <= gate() + FLT_MIN )
|
||||
{
|
||||
incrementBufferCount();
|
||||
if( bufferCount() > timeout() )
|
||||
|
||||
@@ -154,6 +154,25 @@ SampleBuffer::~SampleBuffer()
|
||||
|
||||
|
||||
|
||||
void SampleBuffer::sanitizeSettings()
|
||||
{
|
||||
m_varLock.lock();
|
||||
|
||||
if( m_startFrame >= m_endFrame )
|
||||
{
|
||||
m_endFrame = m_startFrame+1;
|
||||
}
|
||||
|
||||
if( m_loopStartFrame >= m_loopEndFrame )
|
||||
{
|
||||
m_loopEndFrame = m_loopStartFrame+1;
|
||||
}
|
||||
|
||||
m_varLock.unlock();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void SampleBuffer::update( bool _keep_settings )
|
||||
{
|
||||
@@ -733,14 +752,14 @@ sampleFrame * SampleBuffer::getSampleFragment( f_cnt_t _start,
|
||||
{
|
||||
if( _looped )
|
||||
{
|
||||
if( _start + _frames <= m_loopEndFrame )
|
||||
if( _start + _frames <= m_loopEndFrame || m_loopStartFrame >= m_loopEndFrame )
|
||||
{
|
||||
return m_data + _start;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( _start + _frames <= m_endFrame )
|
||||
if( _start + _frames <= m_endFrame || m_startFrame >= m_endFrame )
|
||||
{
|
||||
return m_data + _start;
|
||||
}
|
||||
@@ -828,6 +847,27 @@ void SampleBuffer::visualize( QPainter & _p, const QRect & _dr,
|
||||
|
||||
|
||||
|
||||
void SampleBuffer::setLoopStartFrame( f_cnt_t start )
|
||||
{
|
||||
m_varLock.lock();
|
||||
m_loopStartFrame = start;
|
||||
m_varLock.unlock();
|
||||
|
||||
sanitizeSettings();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SampleBuffer::setLoopEndFrame( f_cnt_t end )
|
||||
{
|
||||
m_varLock.lock();
|
||||
m_loopEndFrame = end;
|
||||
m_varLock.unlock();
|
||||
|
||||
sanitizeSettings();
|
||||
}
|
||||
|
||||
|
||||
|
||||
QString SampleBuffer::openAudioFile() const
|
||||
{
|
||||
@@ -1240,21 +1280,25 @@ void SampleBuffer::loadFromBase64( const QString & _data )
|
||||
|
||||
|
||||
|
||||
void SampleBuffer::setStartFrame( const f_cnt_t _s )
|
||||
void SampleBuffer::setStartFrame( f_cnt_t start )
|
||||
{
|
||||
m_varLock.lock();
|
||||
m_loopStartFrame = m_startFrame = _s;
|
||||
m_loopStartFrame = m_startFrame = start;
|
||||
m_varLock.unlock();
|
||||
|
||||
sanitizeSettings();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void SampleBuffer::setEndFrame( const f_cnt_t _e )
|
||||
void SampleBuffer::setEndFrame( f_cnt_t end )
|
||||
{
|
||||
m_varLock.lock();
|
||||
m_loopEndFrame = m_endFrame = _e;
|
||||
m_loopEndFrame = m_endFrame = end;
|
||||
m_varLock.unlock();
|
||||
|
||||
sanitizeSettings();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -355,8 +355,10 @@ void configManager::loadConfigFile()
|
||||
if( m_stkDir.isEmpty() || m_stkDir == QDir::separator() ||
|
||||
!QDir( m_stkDir ).exists() )
|
||||
{
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
#if defined(LMMS_BUILD_WIN32)
|
||||
m_stkDir = m_dataDir + "stk/rawwaves/";
|
||||
#elif defined(LMMS_BUILD_APPLE)
|
||||
m_stkDir = qApp->applicationDirPath() + "/../share/stk/rawwaves/";
|
||||
#else
|
||||
m_stkDir = "/usr/share/stk/rawwaves/";
|
||||
#endif
|
||||
|
||||
@@ -749,6 +749,11 @@ void song::clearProject()
|
||||
engine::automationEditor()->setCurrentPattern( NULL );
|
||||
}
|
||||
|
||||
if( engine::pianoRoll() )
|
||||
{
|
||||
engine::pianoRoll()->reset();
|
||||
}
|
||||
|
||||
m_tempoModel.reset();
|
||||
m_masterVolumeModel.reset();
|
||||
m_masterPitchModel.reset();
|
||||
@@ -920,8 +925,7 @@ void song::loadProject( const QString & _file_name )
|
||||
{
|
||||
if( node.nodeName() == "trackcontainer" )
|
||||
{
|
||||
( (JournallingObject *)( this ) )->
|
||||
restoreState( node.toElement() );
|
||||
( (JournallingObject *)( this ) )->restoreState( node.toElement() );
|
||||
}
|
||||
else if( node.nodeName() == "controllers" )
|
||||
{
|
||||
@@ -933,37 +937,25 @@ void song::loadProject( const QString & _file_name )
|
||||
}
|
||||
else if( engine::hasGUI() )
|
||||
{
|
||||
if( node.nodeName() ==
|
||||
engine::getControllerRackView()->nodeName() )
|
||||
if( node.nodeName() == engine::getControllerRackView()->nodeName() )
|
||||
{
|
||||
engine::getControllerRackView()->
|
||||
restoreState( node.toElement() );
|
||||
engine::getControllerRackView()->restoreState( node.toElement() );
|
||||
}
|
||||
else if( node.nodeName() == engine::pianoRoll()->nodeName() )
|
||||
{
|
||||
engine::pianoRoll()->restoreState( node.toElement() );
|
||||
}
|
||||
else if( node.nodeName() ==
|
||||
engine::automationEditor()->
|
||||
nodeName() )
|
||||
else if( node.nodeName() == engine::automationEditor()->nodeName() )
|
||||
{
|
||||
engine::automationEditor()->
|
||||
restoreState( node.toElement() );
|
||||
engine::automationEditor()->restoreState( node.toElement() );
|
||||
}
|
||||
else if( node.nodeName() ==
|
||||
engine::getProjectNotes()->
|
||||
nodeName() )
|
||||
else if( node.nodeName() == engine::getProjectNotes()->nodeName() )
|
||||
{
|
||||
engine::getProjectNotes()->
|
||||
SerializingObject::restoreState( node.toElement() );
|
||||
engine::getProjectNotes()->SerializingObject::restoreState( node.toElement() );
|
||||
}
|
||||
else if( node.nodeName() ==
|
||||
m_playPos[Mode_PlaySong].
|
||||
m_timeLine->nodeName() )
|
||||
else if( node.nodeName() == m_playPos[Mode_PlaySong].m_timeLine->nodeName() )
|
||||
{
|
||||
m_playPos[Mode_PlaySong].
|
||||
m_timeLine->restoreState(
|
||||
node.toElement() );
|
||||
m_playPos[Mode_PlaySong].m_timeLine->restoreState( node.toElement() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1019,15 +1011,13 @@ bool song::saveProjectFile( const QString & _filename )
|
||||
engine::getControllerRackView()->saveState( dataFile, dataFile.content() );
|
||||
engine::pianoRoll()->saveState( dataFile, dataFile.content() );
|
||||
engine::automationEditor()->saveState( dataFile, dataFile.content() );
|
||||
engine::getProjectNotes()->
|
||||
SerializingObject::saveState( dataFile, dataFile.content() );
|
||||
m_playPos[Mode_PlaySong].m_timeLine->saveState(
|
||||
dataFile, dataFile.content() );
|
||||
engine::getProjectNotes()->SerializingObject::saveState( dataFile, dataFile.content() );
|
||||
m_playPos[Mode_PlaySong].m_timeLine->saveState( dataFile, dataFile.content() );
|
||||
}
|
||||
|
||||
saveControllerStates( dataFile, dataFile.content() );
|
||||
|
||||
return dataFile.writeFile( _filename );
|
||||
return dataFile.writeFile( _filename );
|
||||
}
|
||||
|
||||
|
||||
@@ -1172,8 +1162,7 @@ void song::exportProject(bool multiExport)
|
||||
efd.setFileMode( FileDialog::AnyFile );
|
||||
int idx = 0;
|
||||
QStringList types;
|
||||
while( __fileEncodeDevices[idx].m_fileFormat !=
|
||||
ProjectRenderer::NumFileFormats )
|
||||
while( __fileEncodeDevices[idx].m_fileFormat != ProjectRenderer::NumFileFormats )
|
||||
{
|
||||
types << tr( __fileEncodeDevices[idx].m_description );
|
||||
++idx;
|
||||
@@ -1224,8 +1213,7 @@ void song::setModified()
|
||||
{
|
||||
m_modified = true;
|
||||
if( engine::mainWindow() &&
|
||||
QThread::currentThread() ==
|
||||
engine::mainWindow()->thread() )
|
||||
QThread::currentThread() == engine::mainWindow()->thread() )
|
||||
{
|
||||
engine::mainWindow()->resetWindowTitle();
|
||||
}
|
||||
@@ -1263,14 +1251,6 @@ void song::removeController( Controller * _controller )
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool song::isLoadingProject()
|
||||
{
|
||||
return m_loadingProject;
|
||||
}
|
||||
|
||||
|
||||
#include "moc_song.cxx"
|
||||
|
||||
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
#include "text_float.h"
|
||||
|
||||
|
||||
#if QT_VERSION < 0x040800
|
||||
#define MiddleButton MidButton
|
||||
#endif
|
||||
|
||||
|
||||
QPixmap * timeLine::s_timeLinePixmap = NULL;
|
||||
QPixmap * timeLine::s_posMarkerPixmap = NULL;
|
||||
|
||||
@@ -1120,7 +1120,7 @@ void trackContentWidget::dropEvent( QDropEvent * _de )
|
||||
m_trackView->trackContainerView()->fixedTCOs() == false )
|
||||
{
|
||||
const MidiTime pos = getPosition( _de->pos().x()
|
||||
).toNearestTact();
|
||||
).getTact() * MidiTime::ticksPerTact();
|
||||
trackContentObject * tco = getTrack()->createTCO( pos );
|
||||
|
||||
// value contains our XML-data so simply create a
|
||||
|
||||
@@ -1597,8 +1597,6 @@ void AutomationEditor::paintEvent( QPaintEvent * _pe )
|
||||
++it;
|
||||
}
|
||||
|
||||
Q_ASSERT( it == time_map.end()-1 );
|
||||
|
||||
for( int i = it.key(), x = xCoordOfTick( i ); x <= width();
|
||||
i++, x = xCoordOfTick( i ) )
|
||||
{
|
||||
|
||||
@@ -641,6 +641,15 @@ PianoRoll::PianoRoll() :
|
||||
}
|
||||
|
||||
|
||||
|
||||
void PianoRoll::reset()
|
||||
{
|
||||
m_lastNoteVolume = DefaultVolume;
|
||||
m_lastNotePanning = DefaultPanning;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void PianoRoll::changeNoteEditMode( int i )
|
||||
{
|
||||
m_noteEditMode = (noteEditMode) i;
|
||||
|
||||
@@ -537,7 +537,7 @@ void pattern::updateBBTrack()
|
||||
engine::getBBTrackContainer()->updateBBTrack( this );
|
||||
}
|
||||
|
||||
if( engine::pianoRoll()->currentPattern() == this )
|
||||
if( engine::pianoRoll() && engine::pianoRoll()->currentPattern() == this )
|
||||
{
|
||||
engine::pianoRoll()->update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user