Skip to content

Commit

Permalink
Version 0.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
dsafa committed Dec 2, 2018
2 parents 9b2f6f3 + a073700 commit ed2d4bd
Show file tree
Hide file tree
Showing 25 changed files with 4,495 additions and 49 deletions.
122 changes: 121 additions & 1 deletion LICENSE-3RD-PARTY
Original file line number Diff line number Diff line change
Expand Up @@ -334,4 +334,124 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
----------------------------------------------------
----------------------------------------------------
https://raw.githubusercontent.com/MahApps/MahApps.Metro.IconPacks/dev/LICENSE
The MIT License (MIT)

Copyright (c) 2016-2018 MahApps, Jan Karger

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
----------------------------------------------------
https://raw.githubusercontent.com/Templarian/MaterialDesign/master/LICENSE
Copyright (c) 2014, Austin Andrews (http://materialdesignicons.com/),
with Reserved Font Name Material Design Icons.
Copyright (c) 2014, Google (http://www.google.com/design/)
uses the license at https://github.com/google/material-design-icons/blob/master/LICENSE

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ There is currently no installer available, however there are prereleases in the

**IMPORTANT** If nothing happens after selecting `Audio Band` from the toolbars menu or if there are no options in the `Audio Source` menu, some files are being blocked by windows. To fix it, run `unblock.ps1` with powershell. If that doesn't work you can manually fix it by right clicking the files -> properties and clicking unblock. If there are still problems, feel free to post an issue.

### Current Supported Audio Sources
- Spotify (see below for setup instructions and issues)
## Current Supported Audio Sources (see below for setup instructions and issues)
- Spotify
- iTunes
- MusicBee

### Spotify Setup
1. Login to the [Spotify dashboard](https://developer.spotify.com/dashboard/login) and create a new App. Fill in the details, you can name it whatever you want. This app will be just for AudioBand.
Expand All @@ -49,7 +51,12 @@ There is currently no installer available, however there are prereleases in the
#### Spotify Issues
- The song progress will be out of sync if you change the song's progress. This is due to current limitations making the song progress being tracked locally. This can be fixed if you pause and play again or go to a different song.
- The first time you open up Spotify, the current song may not be displayed. This is because Spotify doesn't report any song information if you have no devices playing songs. Just start playing a song and it will start displaying.
- It may randomly stop updating song information. You can deselect and reselect Spotify as the audio source to fix it.

### iTunes
- iTunes will open when the audio source is selected, and cannot be changed (as far as I know).

### MusicBee
- Make sure that the [Musicbee IPC plugin](https://getmusicbee.com/addons/plugins/138/musicbeeipc/) is installed for MusicBee. Use this [link](https://getmusicbee.com/forum/index.php?topic=11492.0) if that link doesn't work.

## Customization
Right click audio band and select `Audio Band Settings` and a new window will appear where you can do your customization. A description of the options can be found [here](https://github.com/dsafa/audio-band/wiki/Audio-Band-settings). *In app help coming soon*
Expand Down
2 changes: 2 additions & 0 deletions src/AudioBand.AudioSource/AudioBand.AudioSource.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\AudioBand.AudioSource.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -41,6 +42,7 @@
<Compile Include="IAudioSource.cs" />
<Compile Include="IAudioSourceLogger.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SettingChangedEventArgs.cs" />
<Compile Include="SettingValidationResult.cs" />
<Compile Include="TrackInfoChangedEventArgs.cs" />
</ItemGroup>
Expand Down
36 changes: 21 additions & 15 deletions src/AudioBand.AudioSource/IAudioSource.cs
Original file line number Diff line number Diff line change
@@ -1,74 +1,80 @@
using System;
using System.ComponentModel;
using System.ComponentModel.Composition;
using System.Threading;
using System.Threading.Tasks;

namespace AudioBand.AudioSource
{
/// <summary>
/// Provides information from an audio source and exposes controls
/// Provides information and notifies changes from an audio source and exposes playback controls.
/// </summary>
[InheritedExport(typeof(IAudioSource))]
public interface IAudioSource : INotifyPropertyChanged
public interface IAudioSource
{
/// <summary>
/// Name of the audio source which is displayed
/// Gets the name of the audio source.
/// </summary>
/// <value>The name of the audio source.</value>
string Name { get; }

/// <summary>
/// Audio source logger that will be injected
/// Gets or sets the <see cref="IAudioSourceLogger"/> used for logging.
/// </summary>
/// <value>Audio source logger that will be injected.</value>
IAudioSourceLogger Logger { get; set; }

/// <summary>
/// Track information has changed
/// Occurs when a setting has changed internally.
/// </summary>
event EventHandler<SettingChangedEventArgs> SettingChanged;

/// <summary>
/// Occurs when track information has changed.
/// </summary>
event EventHandler<TrackInfoChangedEventArgs> TrackInfoChanged;

/// <summary>
/// Track is now playing
/// Occurs when the playback state has changed to playing.
/// </summary>
event EventHandler TrackPlaying;

/// <summary>
/// Track is paused
/// Occurs when the playback state has changed to paused.
/// </summary>
event EventHandler TrackPaused;

/// <summary>
/// Track progress has changed to the current song duration
/// Occurs when the current track progress has changed.
/// </summary>
event EventHandler<TimeSpan> TrackProgressChanged;

/// <summary>
/// This audio source has been selected
/// Called when the audio source is active.
/// </summary>
Task ActivateAsync(CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// The audio source is no longer active
/// Called when the audio source is no longer active.
/// </summary>
Task DeactivateAsync(CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// User requested to play the track. This should trigger <see cref="TrackPlaying"/> if successful
/// Called when there is a request to start playback.
/// </summary>
Task PlayTrackAsync(CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// User requested to pause the track. This should trigger <see cref="TrackPaused"/> if successful
/// Called when there is a request to stop playback.
/// </summary>
Task PauseTrackAsync(CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// User requested the previous track
/// Called when there is a request to skip to the previous track.
/// </summary>
Task PreviousTrackAsync(CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// User requested the next track
/// Called when there is a request to skip to the next track.
/// </summary>
Task NextTrackAsync(CancellationToken cancellationToken = default(CancellationToken));
}
Expand Down
24 changes: 24 additions & 0 deletions src/AudioBand.AudioSource/SettingChangedEventArgs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;

namespace AudioBand.AudioSource
{
/// <summary>
/// Provides data for a <see cref="IAudioSource.SettingChanged"/> event.
/// </summary>
public class SettingChangedEventArgs : EventArgs
{
/// <summary>
/// Name of the setting's property that changed.
/// </summary>
public string PropertyName { get; set; }

/// <summary>
/// Creates a new instance of a <see cref="SettingChangedEventArgs"/> with the setting name.
/// </summary>
/// <param name="propertyName">Name of the setting's property that changed.</param>
public SettingChangedEventArgs(string propertyName)
{
PropertyName = propertyName;
}
}
}
12 changes: 12 additions & 0 deletions src/AudioBand.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpotifyAudioSource", "Spoti
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AudioBand.Test", "AudioBand.Test\AudioBand.Test.csproj", "{E5E9CB59-C8CF-4042-9C13-F216153334B6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iTunesAudioSource", "iTunesAudioSource\iTunesAudioSource.csproj", "{6D881B7B-3F3F-4613-A83F-75E31EEA5252}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MusicBeeAudioSource", "MusicBeeAudioSource\MusicBeeAudioSource.csproj", "{741DB79C-921D-4D91-85F1-CD10C746F46E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -33,6 +37,14 @@ Global
{E5E9CB59-C8CF-4042-9C13-F216153334B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5E9CB59-C8CF-4042-9C13-F216153334B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5E9CB59-C8CF-4042-9C13-F216153334B6}.Release|Any CPU.Build.0 = Release|Any CPU
{6D881B7B-3F3F-4613-A83F-75E31EEA5252}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D881B7B-3F3F-4613-A83F-75E31EEA5252}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D881B7B-3F3F-4613-A83F-75E31EEA5252}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D881B7B-3F3F-4613-A83F-75E31EEA5252}.Release|Any CPU.Build.0 = Release|Any CPU
{741DB79C-921D-4D91-85F1-CD10C746F46E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{741DB79C-921D-4D91-85F1-CD10C746F46E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{741DB79C-921D-4D91-85F1-CD10C746F46E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{741DB79C-921D-4D91-85F1-CD10C746F46E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading

0 comments on commit ed2d4bd

Please sign in to comment.