.. CS116 documentation master file, created by
   sphinx-quickstart on Mon Mar  4 10:37:08 2019.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

SoundSample
============

A SoundSample represents a single moment in a Sound object. It contains an amplitude. 

To make a sound louder, you would multiply its amplitude by a number n > 1. 

To make a sound quieter, you would multiply its amplitude by a number 0 < n < 1.


Example Usage
-------------

.. code:: python
   
   sample = SoundSample(100)
   
   # This prints 100.
   print(sample.getValue())

   sample.setValue(55)
   
   # This prints 55.
   print(sample.getValue()

Initialization
--------------

.. py:function:: SoundSample.SoundSample(self, value)

   :param int value: the sample's amplitude.
   
.. code:: python

   sample = SoundSample(100)


Getters
-------

Return the sample's amplitude.

.. py:function:: SoundSample.getValue(self)

.. code:: python

   sample.getValue()


Setters
-------

Set the sample's amplitude to a new value.

.. py:function:: SoundSample.setValue(self, value)

   :param int value: the sample's new amplitude.
   
.. code:: python

   sample.setValue(55)

