Clean up a few bits.
[dcpomatic.git] / src / lib / film_state.cc
index 343e9ebb4f4c4305e9f26e60b393c618d9fd973f..29bf71db332be8045f2c290823b8c469718d2742 100644 (file)
@@ -266,3 +266,18 @@ FilmState::content_type () const
 
        return VIDEO;
 }
+
+/** @return Number of bytes per sample of a single channel */
+int
+FilmState::bytes_per_sample () const
+{
+       switch (audio_sample_format) {
+       case AV_SAMPLE_FMT_S16:
+               return 2;
+       default:
+               assert (false);
+       }
+
+       assert (false);
+       return 0;
+}