Git Product home page Git Product logo

Comments (8)

r00t8ug83 avatar r00t8ug83 commented on August 28, 2024

amixer get master
amixer: Unable to find simple control 'master',0

I am using analogue not HDMI

from douban.fm.

taizilongxu avatar taizilongxu commented on August 28, 2024

how about this #22

from douban.fm.

r00t8ug83 avatar r00t8ug83 commented on August 28, 2024

okie, for raspberry pi user douban.py inside find "Master" > "PCM" fix the bug.

from douban.fm.

qfengnh avatar qfengnh commented on August 28, 2024

有解决办法吗?

from douban.fm.

taizilongxu avatar taizilongxu commented on August 28, 2024
    def get_volume(self):
        if self.platform == 'Linux':
            volume = subprocess.check_output('amixer get Master | grep Mono: | cut -d " " -f 6', shell=True)
            return volume[1:-3]
        elif self.platform == 'Darwin':
            return subprocess.check_output('osascript -e "output volume of (get volume settings)"', shell=True)
        else:
            return

    # 调整音量大小
    def change_volume(self, increment):
        if increment == 1:
            volume = int(self.volume) + 5
        else:
            volume = int(self.volume) - 5
        if self.platform == 'Linux':
            subprocess.Popen('amixer set Master ' + str(volume) + '% >/dev/null 2>&1', shell=True)
        elif self.platform == 'Darwin':
            subprocess.Popen('osascript -e "set volume output volume ' + str(volume) + '"', shell=True)
        else:
            pass

因为声卡不一样,上面的同学是把"Master" 转换成"PCM"就可以了,你可以看看你的声卡是哪种,替换master应该就可以了

http://blog.csdn.net/juncoder/article/details/39269595 这里也有查看的方法

from douban.fm.

qfengnh avatar qfengnh commented on August 28, 2024

多谢 大神 指点,现已搞定

from douban.fm.

royjiang avatar royjiang commented on August 28, 2024

hi, just found this post after i posted another issue for the same symptom :)

from douban.fm.

k9gardner avatar k9gardner commented on August 28, 2024

okie, for raspberry pi user douban.py inside find "Master" > "PCM" fix the bug.

What does this statement mean? What do you mean by "inside" and "find", are these commands? Please give full syntax. I've been struggling with this for too long. Thanks.

from douban.fm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.