Commit Graph
25 Commits
Author SHA1 Message Date
Tobias Doerffel 20589f19e4 Mixer: rewrote processing chain of rendered audio buffers
Until now, Mixer not only was responsible for rendering audio buffers
but also managed writing them to audio backend (through a FIFO) and
handled various quality related parameters.

All this functionality has been moved into the new AudioOutputContext
class. It glues together AudioBackend (formerly called AudioDevice),
global quality settings and the Mixer.

The AudioOutputContext class creates a FifoWriter which calls
Mixer::renderNextBuffer() and writes the output into the BufferFifo of
the AudioOutputContext it belongs to. The BufferFifo is read by the
according AudioBackend which belongs to the AudioOutputContext as well.

The AudioOutputContext also handles resampling in case the AudioBackend
wants the buffers in a different samplerate.

During this rewrite the Mixer class and the according source files have
been renamed from "mixer" to "Mixer". This results in small changes
all over LMMS' code base.
2009-11-29 01:46:23 +01:00
Andrew Kelley 1c118f1a46 sample_buffer: made MP3 decoder more robust
The mp3 decoder was using an uncomfortably large buffer,
laughably because of a negative overflow. Fixed this and
added a failsafe check to prevent buffer overflows.

Additionally changed printfs to qWarnings and fixed copyright
notice in audio_file_mp3.
2009-08-12 04:34:24 -07:00
Tobias Doerffel 9cdb6cca3b SampleBuffer: display different message if file was not found
Instead of displaying a message about failed decoding of a file,
properly indicate the actual problem if the file itself does not exist.
2009-08-05 18:19:04 +02:00
Tobias Doerffel 0bb54199b0 Whole code base: various cleanups, removed SINGLE_SOURCE_COMPILE relicts
* cleaned up code and improved coding style
* removed old SINGLE_SOURCE_COMPILE macro relicts
* use QString::toUtf8() instead of QString::toAscii() wherever possible
2009-08-05 11:41:59 +02:00
Tobias Doerffel afbaabed02 SampleBuffer: do not show messagebox if there's no GUI
Showing a messagebox if LMMS is running in console-mode only is bad and
makes it crash. Therefore check for engine::hasGUI() first.
2009-08-04 12:11:30 +02:00
Andrew Kelley 2aae228af4 Refactor supportedFileExts from AudioFileProcessor
Refactor supported file extensions from AudioFileProcessor to
sampleBuffer, where the magic really happens. Change the hard-
coded MessageBox explaining supported formats to the real deal.
Also added modelines and switched spaces to tabs in the files
affected.
2009-07-16 04:34:11 -07:00
Andrew Kelley c7205351c2 convert soft tabs to hard tabs and add a modeline 2009-07-16 03:30:31 -07:00
Andrew Kelley a9a8e1c3a5 sampleBuffer::decodeSampleMp3 implemented
AudioFileProcessor can now open MP3 samples.
2009-07-15 14:43:56 -07:00
Andrew Kelley 0390d4aadb SampleBuffer - message box upon decode sample fail
When SampleBuffer can't decode an audio sample, it explains why
in a friendly message box, instead of silently failing.
2009-07-15 08:20:06 -07:00
Tobias Doerffel b01724c666 * when resampling whole sampleBuffer, set end_of_input = 1 in libsamplerate data struct - fixes lots of zero samples at the end of output buffer (closes #2531452)
* coding style fixes
* removed obsolete save/restore of EOF-property in libsample rate data struct when resampling successively (always use 0)



git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@2039 0778d3d1-df1d-0410-868b-ea421aaaa00d
2009-02-13 16:35:40 +00:00
Tobias Doerffel fcca686f50 do not load samples bigger than 100 MB (closes #2458375)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@2018 0778d3d1-df1d-0410-868b-ea421aaaa00d
2009-02-12 22:17:36 +00:00
Tobias Doerffel 9e4e576de9 * fixed out-of-boundary array access when reversing samples
* optimized loops for loading samples



git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1793 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-10-25 10:12:44 +00:00
Tobias Doerffel fce25dc625 fixed a bunch warnings and remarks issued by Intel Compiler
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1722 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-10-02 11:48:59 +00:00
Tobias Doerffel b83b56fdf5 fixed compiler warnings
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1704 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-09-24 09:08:15 +00:00
Tobias Doerffel 9bde7d2fb6 fixed sampleBuffer::tryToMakeRelative() for win32 - paths to samples are now saved relative in win32-version too (if possible)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1469 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-08-22 22:43:48 +00:00
Tobias Doerffel ee631ad210 fixed crashes when automating start- and end-point in AudioFileProcessor (closes #2048125)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1461 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-08-22 17:31:45 +00:00
Tobias Doerffel f21b858f5e heavily improved performance by using QPainter::drawPolylines and disabling anti-aliasing if more than 60000 samples have to be drawn (closes #1938413)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1429 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-08-01 23:56:19 +00:00
Tobias Doerffel 30756e7399 less header-dependencies and moved some type-definitions
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1372 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-07-25 11:16:45 +00:00
Tobias Doerffel e637495489 migrated build-system to CMAKE
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1352 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-07-22 11:36:50 +00:00
Tobias Doerffel 7bf55d3c62 fixed broken logic when updating sample-data
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1225 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-06-30 16:50:50 +00:00
Tobias Doerffel c2d9a5315d removed support for SDL_sound-library as libsndfile and libvorbis do everything we need
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1222 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-06-30 12:46:35 +00:00
Tobias Doerffel d6262bb556 use lmmsconfig.h rather than config.h and use prefixed macro-names
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1097 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-06-08 11:30:47 +00:00
Tobias Doerffel 7c6a7cdea3 fixed platform-dependent sampleBuffer::tryToMakeAbsolute(...)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1060 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-06-03 11:03:34 +00:00
Tobias Doerffel 5cfb1b2f96 made quality-settings (internal processing samplerate, interpolation and so on) independent of audio-devices (final output) and added new qualitySettings-structure to mixer - might be still buggy and HQ-mode is currently not working, this is going to be fixed tomorrow, anyways important preparation for new project-export-dialog
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@957 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-05-05 23:14:48 +00:00
Tobias Doerffel c1e7a7301b moved to src/core/
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@844 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-04-01 20:49:40 +00:00