# Path: pygaze/settings.py
# class Settings(object):
#     def __init__(self):
#     def read_module(self, mod):
#     def __getattr__(self, setting):
#     def __setattr__(self, setting, value):
# 
# Path: pygaze/_misc/misc.py
# def copy_docstr(src, target):
# 
#     """
#     Copies docstrings from the methods of a source class to the methods of a
#     target class.
#     
#     arguments:
#     src        --    source class (e.g. BaseDisplay)
#     target    --    target class (e.g. PyGameDisplay)
#     """
#     
#     for attr_name in dir(target):
#         if not hasattr(src, attr_name) or not ismethod(getattr(src, attr_name)):
#             continue
#         getattr(target, attr_name).__func__.__doc__ = getattr(src, attr_name).__func__.__doc__
# 
# Path: pygaze/_sound/basesound.py
# class BaseSound:
# 
#     """A Sound class for creating and playing sounds"""
# 
#     def __init__(self):
#         
#         """
#         Initializes a Sound Instance
#         
#         arguments
# 
#         None
#         
#         keyword arguments
#         
#         osc        --    type of oscillator; allowed: "sine", "saw", "square",
#                     "whitenoise" (default = SOUNDOSCILLATOR)
#         freq        --    sound frequency in Herz, either float or integer
#                     (default = SOUNDFREQUENCY)
#         length    --    sound length in milliseconds (default = 
#                     SOUNDLENGTH)
#         attack    --    sound attack ('fade in') in milliseconds (default = 
#                     SOUNDATTACK)
#         decay        --    sound decay ('fade out') in milliseconds (default =
#                     SOUNDDECAY)
#         soundfile    --    full path to soundfile with .ogg or .wav extension
#                     or None for no file; if a file is specified, all
#                     other keyword arguments will be ignored (default =
#                     None)
#         """
# 
#         pass
# 
# 
#     def pan(self):
# 
#         """
#         Sets the panning of a sound (the volume of the 'unpanned'
#         channel decreases, while the other channel remaines the same)
#         
#         arguments
# 
#         panning    --    either a float between -1 and 1, "left" or "right":
#                     "left":    full panning to left (same as -1)
#                     < 0:     panning to left
#                     0:        no panning
#                     > 0:    panning to right
#                     "right":    full panning to left (same as 1)
#         
#         keyword arguments
#         
#         None
#         
#         returns
#         
#         None        -- self.sound is panned
#         """
# 
#         pass
# 
# 
#     def play(self):
# 
#         """
#         Plays specified sound (keyword argument loops specifies how many
#         repeats after being played once, -1 is infinite); function does not
#         wait for playback end, but returns immediately
#         
#         arguments
# 
#         None
#         
#         keyword arguments
#         
#         repeats    --    specifies the amount of repeats after being played
#                     once (-1 is infinite) (default = 0)
#         
#         returns
#         
#         None        --    self.sound is played
#         """
# 
#         pass
# 
# 
#     def stop(self):
# 
#         """
#         Stops sound playback
#         
#         arguments
# 
#         None
#         
#         keyword arguments
#         
#         None
#         
#         returns
#         
#         None        --    self.sound stops playing
#         """
# 
#         pass
# 
# 
#     def set_volume(self):
# 
#         """
#         Set the playback volume (loudness) to specified value
#         
#         arguments
#         
#         volume    --    float between 0 and 1
#         
#         keyword arguments
#         
#         None
#         
#         returns
#         
#         None        --    sets self.sound volume to specified value
#         """
# 
#         pass


from pygaze.py3compat import *
from pygaze import settings
from pygaze._misc.misc import copy_docstr
from pygaze._sound.basesound import BaseSound
            from pygaze._sound.pygamesound import PyGameSound as Sound

#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>



class Sound(BaseSound):

    """Sound playback"""

    def __init__(self, disptype=settings.DISPTYPE, **args):

        """
        See BaseSound docstring
        """

        if disptype in ("pygame", "psychopy", "opensesame"):
        else:
            raise Exception("Unexpected disptype: {}".format(disptype))
        self.__class__ = Sound
        self.__class__.__init__(self, **args)

# Path: pygaze/settings.py
# class Settings(object):
#     def __init__(self):
#     def read_module(self, mod):
#     def __getattr__(self, setting):
#     def __setattr__(self, setting, value):
# 
# Path: pygaze/_misc/misc.py
# def copy_docstr(src, target):
# 
#     """
#     Copies docstrings from the methods of a source class to the methods of a
#     target class.
#     
#     arguments:
#     src        --    source class (e.g. BaseDisplay)
#     target    --    target class (e.g. PyGameDisplay)
#     """
#     
#     for attr_name in dir(target):
#         if not hasattr(src, attr_name) or not ismethod(getattr(src, attr_name)):
#             continue
#         getattr(target, attr_name).__func__.__doc__ = getattr(src, attr_name).__func__.__doc__
# 
# Path: pygaze/_sound/basesound.py
# class BaseSound:
# 
#     """A Sound class for creating and playing sounds"""
# 
#     def __init__(self):
#         
#         """
#         Initializes a Sound Instance
#         
#         arguments
# 
#         None
#         
#         keyword arguments
#         
#         osc        --    type of oscillator; allowed: "sine", "saw", "square",
#                     "whitenoise" (default = SOUNDOSCILLATOR)
#         freq        --    sound frequency in Herz, either float or integer
#                     (default = SOUNDFREQUENCY)
#         length    --    sound length in milliseconds (default = 
#                     SOUNDLENGTH)
#         attack    --    sound attack ('fade in') in milliseconds (default = 
#                     SOUNDATTACK)
#         decay        --    sound decay ('fade out') in milliseconds (default =
#                     SOUNDDECAY)
#         soundfile    --    full path to soundfile with .ogg or .wav extension
#                     or None for no file; if a file is specified, all
#                     other keyword arguments will be ignored (default =
#                     None)
#         """
# 
#         pass
# 
# 
#     def pan(self):
# 
#         """
#         Sets the panning of a sound (the volume of the 'unpanned'
#         channel decreases, while the other channel remaines the same)
#         
#         arguments
# 
#         panning    --    either a float between -1 and 1, "left" or "right":
#                     "left":    full panning to left (same as -1)
#                     < 0:     panning to left
#                     0:        no panning
#                     > 0:    panning to right
#                     "right":    full panning to left (same as 1)
#         
#         keyword arguments
#         
#         None
#         
#         returns
#         
#         None        -- self.sound is panned
#         """
# 
#         pass
# 
# 
#     def play(self):
# 
#         """
#         Plays specified sound (keyword argument loops specifies how many
#         repeats after being played once, -1 is infinite); function does not
#         wait for playback end, but returns immediately
#         
#         arguments
# 
#         None
#         
#         keyword arguments
#         
#         repeats    --    specifies the amount of repeats after being played
#                     once (-1 is infinite) (default = 0)
#         
#         returns
#         
#         None        --    self.sound is played
#         """
# 
#         pass
# 
# 
#     def stop(self):
# 
#         """
#         Stops sound playback
#         
#         arguments
# 
#         None
#         
#         keyword arguments
#         
#         None
#         
#         returns
#         
#         None        --    self.sound stops playing
#         """
# 
#         pass
# 
# 
#     def set_volume(self):
# 
#         """
#         Set the playback volume (loudness) to specified value
#         
#         arguments
#         
#         volume    --    float between 0 and 1
#         
#         keyword arguments
#         
#         None
#         
#         returns
#         
#         None        --    sets self.sound volume to specified value
#         """
# 
#         pass


# Path: pygaze/sound.py
from pygaze.py3compat import *
from pygaze import settings
from pygaze._misc.misc import copy_docstr
from pygaze._sound.basesound import BaseSound
            from pygaze._sound.pygamesound import PyGameSound as Sound

#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>



class Sound(BaseSound):

    """Sound playback"""

    def __init__(self, disptype=settings.DISPTYPE, **args):

        """
        See BaseSound docstring
        """

        if disptype in ("pygame", "psychopy", "opensesame"):
        else:
            raise Exception("Unexpected disptype: {}".format(disptype))
        self.__class__ = Sound
        self.__class__.__init__(self, **args)

        copy_docstr(BaseSound, Sound)
