Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spotify output not playing #11

Open
DapperDapp opened this issue Mar 30, 2018 · 0 comments
Open

Spotify output not playing #11

DapperDapp opened this issue Mar 30, 2018 · 0 comments

Comments

@DapperDapp
Copy link

Hi I noticed that when I play internet radio, its fine, but with Spotify, there is not output.

I was looking at the index.js and I noticed that you have bluetooth output for the MPD, but not as a default output for volumio. If I uncomment that commented section will it work?

BluetoothController.prototype.writeAsoundFile = function(mac) {
	var self = this;
    var defer = libQ.defer();
	self.logger.info('Change softmixer device for audio device to:' + mac);
	var asoundcontent = '';
    if (mac !== undefined)
    {
        asoundcontent += 'defaults.bluealsa { \n';
        asoundcontent += 'interface "hci0"            # host Bluetooth adapter \n';
        asoundcontent += '   device "' + mac + '"  # Bluetooth headset MAC address \n';
        asoundcontent += '   profile "a2dp" \n';
        asoundcontent += '}\n';
    }
	fs.writeFile('/home/volumio/.asoundrc', asoundcontent, 'utf8', function(err) {
		if (err) {
			self.logger.info('Cannot write /var/lib/mpd/.asoundrc: ' + err);
		} else {
			self.logger.info('asoundrc file written');
			var mv = execSync('/usr/bin/sudo /bin/mv /home/volumio/.asoundrc /var/lib/mpd/.asoundrc', { uid:1000, gid: 1000, encoding: 'utf8' });
			var apply = execSync('/usr/sbin/alsactl -L -R nrestore', { uid:1000, gid: 1000, encoding: 'utf8' });
			var apply3 = execSync('/usr/sbin/alsactl -L -R nrestore', { uid:1000, gid: 1000, encoding: 'utf8' });
		}
	});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant