It has been a long time coming and now it’s here. LibMuse now supports the development of Universal Windows Platform applications using Muse. Both Muse 2014 and Muse 2016 headbands are supported. We’ve also tried to keep the API as close as possible to the API in LibMuse 5.13.0, so those of you familiar with the API from Android or iOS shouldn’t have too much of a learning curve.
Download LibMuse 6.0.0 for Windows at: http://developer.choosemuse.com/developer-sdk-windows
Post questions and comments on the forum: http://forum.choosemuse.com
Release notes / Changelog available below and at: http://developer.choosemuse.com/release-notes
Release notes / Changelog:
This is a major release which adds support for Windows as a development platform. LibMuse for Windows is a static library that is compatible with the Universal Windows Platform (UWP) x86 and x64 platforms. There are minor API breaking changes in this release when compared to the 5.13.0 API and the Windows Beta API.
- Unpaired Muse 2016 headbands that were previously detected but are currently off may be returned when querying MuseManager for the list of Muse headbands. Unpaired Muse 2016 headbands that are off will be removed from the list automatically when the remove_from_list_after timeout expires (30 seconds by default).
- Trying to connect to a Muse 2014 headband that is paired with the computer but is currently off results in a Platform::COMException being thrown. LibMuse will catch this exception and disconnect gracefully, but Visual Studio may become unresponsive if running the application with the debugger attached. This can be avoided by removing Platform::COMException from the “Break when thrown” list in “Exception Settings”. This issue does not happen when running without the debugger attached.
- The example applications can only connect to one headband at a time. If you try to connect to a second headband while one is currently connected or connecting, an exception will be thrown.
Breaking API changes in this release:
- The interaxon::Convert class has been moved to the interaxon::bridge namespace and is now interaxon::bridge::Convert.
- MuseManager::disconnect(bool) no longer takes a boolean parameter and has been replaced with MuseManager::disconnect() which takes no parameters. If you want to unregister all listeners when disconnecting, it is recommended that you call unregister_all_listeners after you receive the DISCONNECTED connection listener callback.
- MuseManager::is_bluetooth_enabled() function has been removed. The sample application has been updated to show how to check if bluetooth is enabled in a platform specific way.
- The DeviceInformation class has been removed. The name, mac address, rssi and last discovered time are available through the Muse class.
- The CharacteristicId enumeration has been removed as it was not used by the API. There is no replacement.
Features introduced in this release:
- LibMuse for Windows is a C++ library that is compatible with the Windows 10 Universal Windows Platform. It supports both Muse 2014 and Muse 2016 headbands.
- New API to allow LibMuse to throw exceptions for debugging purposes rather than trying to catch everything. See Muse::enable_exception for more details.
- 2 sample applications are included in the examples folder. GettingData illustrates how to connect to the Muse headband. ReaderWriter illustrates how to handle file I/O. In both cases, see MainPage.xaml.cpp for the code.
- HTML documentation that describes the C++ API is available from README.html.
- Header files for compiling against the LibMuse library are available in the include folder. Include “muse.h” to include all LibMuse headers.
- Libraries are available for both Win32 (x86) and x64 development. ARM development is not supported at this time due to lack of ARM support in Google’s protobuf libraries.
- There is support for reading and writing .muse files through the MuseFileReader/MuseFileWriter classes. Note however that UWP applications have restrictions on file access based on their capabilities ( https://msdn.microsoft.com/en-us/windows/uwp/files/file-access-permissions ).
Issues addressed in this release:
- Fixes a crash that could occur when accessing AUX EEG values in cases where only 4 channel values are provided. If the AUX value is not provided, 0 is now returned.
- Calling MuseFileWriter::flush() with an empty buffer no longer writes an empty message to the stream. If flush() is called with an empty buffer, the call to flush is ignored.
- Fixed a crash in MuseFileReader if an empty message was read.
- Removed a potential deadlock that could occur if connect() or run_asynchronously() was called during the DISCONNECTED connection listener callback. LibMuse will no longer deadlock, however if 2 connection listeners are registered to the same Muse and the first listener makes the call to connect() or run_asynchronously() when the first listener receives the DISCONNECTED event, then the second listener will receive the original DISCONNECTED event after it receives the CONNECTING event resulting from the first listener’s call to connect() or run_asynchronously().
- Trying to reconnect to a Muse 2014 headband could result in a Platform::COMException which could cause Visual Studio to hang when running with the debugger attached. This is now fixed.
- Fixed an exception that could occur if MuseManager::start_listening() was called immediately after a call to MuseManager::stop_listening().
- Fixed an issue where run_asynchronously() would fail to start when running in Release mode.
- Muse 2014 headbands are now removed from the list of muses in MuseManager when the headband is removed in the Bluetooth settings. You will receive a muse_list_changed callback when this occurs.
- Fixed the refresh button in the example applications to properly refresh the list of Muse headbands. The first item in the list is now shown in the Combobox.
- Adds EventLoopFactory to the class list.
- Fixed the Accelerometer documentation to clarify the X, Y and Z axes.