Commit Graph

89 Commits

Author SHA1 Message Date
Stein Magnus Jodal
e0b51f9c2c docs: Specify what event names AudioListener.on_event() will see 2013-04-26 21:10:34 +02:00
Stein Magnus Jodal
3e366efb20 Move NAD mixer to an external extension 2013-04-16 10:46:57 +02:00
Stein Magnus Jodal
bfceb45609 docs: Remove default config from audio class 2013-04-12 01:31:52 +02:00
Stein Magnus Jodal
ee021b7cf0 docs: Use proper headers in mixer docs 2013-04-12 00:27:00 +02:00
Stein Magnus Jodal
18d34d6ffc docs: Fix typo 2013-04-09 00:27:22 +02:00
Stein Magnus Jodal
09a38d9523 docs: Use :confval: to make config docs linkable 2013-04-09 00:22:24 +02:00
Stein Magnus Jodal
42707f50df audio: Use new config system 2013-04-07 00:08:40 +02:00
Thomas Adamcik
6f39bde566 config: Start passing dummy config explicitly to audio/backends/frontends. 2013-04-02 19:14:46 +02:00
Stein Magnus Jodal
1ac2fec4a5 docs: Tweak module docs formatting 2013-04-01 23:45:23 +02:00
Stein Magnus Jodal
8a8a5109d6 audio: Remove redundant logging 2013-03-30 14:57:37 +01:00
Stein Magnus Jodal
9e5f0703c7 audio: Fix UnicodeDecodeError when logging errors
Fixes #347
2013-03-30 13:16:21 +01:00
Stein Magnus Jodal
02b845bd4b Revert "Merge pull request #231 from adamcik/feature/end-of-track"
This reverts commit 1cf9826f87, reversing
changes made to 711dbe8738.
2013-03-19 23:23:14 +01:00
Stein Magnus Jodal
7bad64fccc audio: Add docstring to DummyAudio 2013-02-25 23:11:41 +01:00
Stein Magnus Jodal
15e6128c2a audio: Add dummy implementation of the audio actor 2013-02-24 22:28:01 +01:00
Thomas Adamcik
fb8fba243a audio/core: Rework how we hook up end of track handling. 2013-01-05 23:16:42 +01:00
Thomas Adamcik
6d1f84ad3c Merge branch 'develop' into feature/end-of-track
Conflicts:
	mopidy/audio/actor.py
	mopidy/backends/spotify/playback.py
2013-01-05 18:47:16 +01:00
Thomas Adamcik
711dbe8738 audio: Create GStreaner connect/disconnect helper.
The audio class had to many attributes for simply tracking connected signals in
my opinion. This change adds a helper for adding and removing signals and storing
the tracking data in a common dictionary instead of a ton of instance attributes.
2013-01-05 18:35:43 +01:00
Thomas Adamcik
729bc26c10 Merge pull request #290 from jodal/feature/limit-spotify-data-pushing
Limit Spotify audio data pushing
2013-01-05 09:11:26 -08:00
Thomas Adamcik
81b6620799 audio: Handle about to finish for non appsrc playback
The appsrc cleanup code was still short circuiting the about to finish handler,
this meant that EOT handling never happened for local files and playback stopped.

With this change proper EOT handling works for all track types.
2013-01-05 17:37:16 +01:00
Thomas Adamcik
39580e1948 Use blocking calls when changing tracks on EOT.
This ensures that we block about-to-finish and the pipeline until the next URI
is set, alowing for at least EOS free playback. If the uri is set quickly enough
this will also be gapless.
2013-01-05 16:46:16 +01:00
Thomas Adamcik
ea5bb18d53 audio: Update mixer track selection logic (fixes #307)
We now ensure that the track we choose has one or more volume channels we can
control. This change also fixes that fact the MIXER_TRACK setting would not
work if we happened to find a track that was flaged as MASTER OUPUT before
finding the right label, so far no one has reported this as an issue.
2013-01-03 22:24:58 +01:00
Stein Magnus Jodal
edde1bc584 audio: Fix docstring 2013-01-03 21:40:20 +01:00
Stein Magnus Jodal
c76ac2d212 audio: Use time conversion utils 2013-01-03 19:40:53 +01:00
Stein Magnus Jodal
64ae7865bb audio: Add clocktime_to_millisecond util function 2013-01-03 19:38:31 +01:00
Stein Magnus Jodal
45d4445eea Merge branch 'develop' into feature/limit-spotify-data-pushing
Conflicts:
	mopidy/backends/spotify/session_manager.py
2013-01-03 16:18:08 +01:00
Thomas Adamcik
b78d5eddac Merge branch 'develop' into feature/end-of-track
Conflicts:
	mopidy/audio/actor.py
	mopidy/backends/spotify/playback.py
2013-01-03 16:12:09 +01:00
Thomas Adamcik
855987447b audio: Docstring typo typo fixing. 2013-01-03 15:51:09 +01:00
Thomas Adamcik
d5b19ab213 audio: Docstring typo fixing. 2013-01-03 15:45:48 +01:00
Thomas Adamcik
88398ea355 Add new mopidy.audio.utils functions (fixes #301).
Adds functions to create buffers, calcalute buffer durations based on number of
samples and the sample rate and converting milliseconds to gst internal clock
time.

This also alows for the removal of all gst imports outside of mopidy.audio.
2013-01-03 15:35:52 +01:00
Stein Magnus Jodal
af6ee16b3a Fix flake8 warnings 2013-01-02 22:25:55 +01:00
Thomas Adamcik
ca82565b08 audio: Move supported URI checking to mopidy.audio.utils
In order to avoid gstreamer imports leaking into more of our code I'm moving
this to a new utils class in audio.
2013-01-01 17:31:17 +01:00
Stein Magnus Jodal
aa0c6f6dc0 audio: Add MB constant to make code more readable 2012-12-24 12:18:48 +01:00
Stein Magnus Jodal
8505ea7f4e Merge branch 'feature/spotify-to-use-gst-time' into feature/limit-spotify-data-pushing
Conflicts:
	mopidy/audio/actor.py
	mopidy/backends/spotify/playback.py
2012-12-24 01:42:40 +01:00
Stein Magnus Jodal
c218375100 audio: Move Spotify appsrc caps out of audio 2012-12-24 01:40:35 +01:00
Stein Magnus Jodal
a02f2a9602 audio: Make appsrc buffer between 0.5 and 1 MB of data 2012-12-23 12:37:12 +01:00
Stein Magnus Jodal
a555e84225 audio: Add appsrc need-data and enough-data callbacks 2012-12-23 12:36:37 +01:00
Stein Magnus Jodal
b3e92ff573 audio: Log buffering messages 2012-12-23 12:35:52 +01:00
Stein Magnus Jodal
9fa0f5213e audio: Setup appsrc with seek-data callback 2012-12-23 12:30:02 +01:00
Stein Magnus Jodal
167932278b audio: Remove blocking get_state() calls in get_position() and seek() 2012-12-23 12:26:56 +01:00
Stein Magnus Jodal
8be84a1ea4 audio: Fix flake8 warning 2012-12-19 22:40:32 +01:00
Trygve Aaberge
81a76bfd92 audio: Define mixer_scale in _setup_mixer 2012-12-19 22:36:00 +01:00
Trygve Aaberge
200e4d2536 audio: Don't try to rescale volume_set if it's None 2012-12-18 19:00:46 +01:00
Trygve Aaberge
fcda4696bc audio: Use None instead of -1 for undefined volume 2012-12-18 18:18:29 +01:00
Trygve Aaberge
d3e3bef2c0 audio: Rename scales in set_volume for consistency 2012-12-18 13:21:24 +01:00
Trygve Aaberge
ee448d4dd3 audio: Make get_volume able to return all levels
This fixes an issue where applications which changes volume by 1 level
at a time could fail to change volume if track.max_volume is less than
100. E.g. get volume could return 44 after volume was set to 43, then
the application would just try to set it to 43 again.
2012-12-18 13:18:56 +01:00
Stein Magnus Jodal
a084105898 docs: Use requirement files as single source of dependencies 2012-12-15 23:07:29 +01:00
Thomas Adamcik
1f544038b0 Setup about to finish handling for proper EOT support.
With this change we ask the core.playback system to set the next tracks uri and
otherwise update state as needed. With this change we should be able to support
streaming oggs and gapless playback to mention a few of items this fixes.

On the down side, this change breaks test_end_of_track_skips_to_next_track_on_failure
as there is no clean way to handle this with the async nature of this EOT
handling.
2012-12-12 23:02:59 +01:00
Thomas Adamcik
2a391f23e1 Use source's factory name to determine type.
Checking the URI inside the new-source handler turned out to tickle some issue
that gave us deadlocks. Getting the source and checking which factory created
it is much safer.
2012-12-12 22:58:49 +01:00
Stein Magnus Jodal
959bd6cd84 audio: Add AudioListener.on_event() 2012-12-01 11:20:44 +01:00
Stein Magnus Jodal
6f0919bda8 style: Fix flake8 warnings 2012-11-19 18:01:31 +01:00