Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Sound / Audio / Wav or mp3

  1. #1

    Sound / Audio / Wav or mp3

    hi,

    What would be the best way to play an audio(wav, mp3) file through Lianja that is 1) Cross Platform 2) If possible not too many external dependencies

    I think http://www.pyglet.org/index.html should be a good solution. I managed to get it running on a machine that has python 2.7.1

    But when I try to install in under Lianja -> python this way
    Code:
    C:\lianja\scriptinglanguages\python\pyglet114>C:\lianja\scriptinglanguages\python\python.exe setup.py install
    I get the following error
    The program can't start because python27.dll is missing from your computer. Try reinstalling the program to fix this problem.

    So it doesn't get installed and I end up with the following
    Code:
    **** Lianja Python error ****
    Traceback (most recent call last):
      File "lib_pgstart.py" at line 3, in <module>
    ImportError: No module named pyglet
    Any suggestion(s)?

    Thanks & Regards,
    M&M
    Last edited by murali_mepath; 2014-04-23 at 08:30.

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,772
    Hi M&M,

    Can you try applying the Registry changes for the Lianja-installed Python as described in this post?

    Regards,

    Yvonne

  3. #3
    hi,

    I understand most part of the solution except for this

    Code:
    Also, this:
    
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\Pyt honCore\2.7\InstallPath\InstallGroup
    
    should have the (Default) string value of:
    
    Python 2.7
    should have the (Default) string value of:

    Python 2.7


    Cheers,
    Murali

  4. #4
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,772
    Hi Murali,

    Like this:

    Name:  InstallGroup.png
Views: 609
Size:  76.4 KB

    Regards,

    Yvonne

  5. #5
    hi,

    hehe...thanks...I would have got it had it been "Python 2.7"

    Old (programmer's) habits die hard...haha...I am referring to myself :-D

    Thanks,
    Murali

  6. #6
    hi

    Still the same :,(

    thanks,
    Murali

  7. #7
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,772
    Hi Murali,

    Try copying the pyglet folder directly into C:\lianja\scriptinglanguages\python\Lib\site-packages\. According to the README in the pyglet package:

    There are no compilation steps during the installation; if you prefer, you can
    simply add this directory to your PYTHONPATH and use pyglet without
    installing it.
    After doing that, I can certainly reference the module from Lianja. I'm on Win 7 64 bit.

    Regards,

    Yvonne

  8. #8
    wow...ok thanks. I tried that but I still get the same error.

    The code that's needed to make the pyglet Oink

    Code:
    import pyglet
    song = pyglet.media.load('c:\chime_up.wav')
    song.play()
    pyglet.app.run()
    Cheers,
    Murali

  9. #9
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,772
    Hi Murali,

    Did you copy the the pyglet folder - i.e. the folder under pyglet-1.1.4 - into C:\lianja\scriptinglanguages\python\Lib\site-packages\?

    Regards,

    Yvonne

  10. #10
    Hi Yvonne,

    Yup, I did. The error that I see now is

    Code:
    Thu 24. Apr 00:48:48 2014
    **** Lianja Python error ****
    Traceback (most recent call last):
      File "Console" at line 1, in <module>
      File "Console" at line 239, in play_sound
      File "C:\lianja\scriptinglanguages\python\Lib\site-packages\pyglet-1.1.4\pyglet\app\__init__.py" at line 264, in run
        EventLoop().run()
      File "C:\lianja\scriptinglanguages\python\Lib\site-packages\pyglet-1.1.4\pyglet\app\win32.py" at line 47, in run
        self._setup()
      File "C:\lianja\scriptinglanguages\python\Lib\site-packages\pyglet-1.1.4\pyglet\app\__init__.py" at line 147, in _setup
        from pyglet.window import Window
      File "C:\lianja\scriptinglanguages\python\Lib\site-packages\pyglet-1.1.4\pyglet\window\__init__.py" at line 1684, in <module>
        gl._create_shadow_window()
      File "C:\lianja\scriptinglanguages\python\Lib\site-packages\pyglet-1.1.4\pyglet\gl\__init__.py" at line 494, in _create_shadow_window
        _shadow_window = Window(width=1, height=1, visible=False)
      File "C:\lianja\scriptinglanguages\python\Lib\site-packages\pyglet-1.1.4\pyglet\window\win32\__init__.py" at line 423, in __init__
        super(Win32Window, self).__init__(*args, **kwargs)
      File "C:\lianja\scriptinglanguages\python\Lib\site-packages\pyglet-1.1.4\pyglet\window\__init__.py" at line 622, in __init__
        EventDispatcher.__init__(self)
    TypeError: expected string or Unicode object, NoneType found
    Thanks & Regards,
    Murali

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us