~ubuntu-branches/ubuntu/oneiric/ecasound2.2/oneiric

« back to all changes in this revision

Viewing changes to libecasound/audioio-mp3.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2008-03-23 21:42:49 UTC
  • mfrom: (3.1.6 hardy)
  • Revision ID: james.westby@ubuntu.com-20080323214249-evlfv3y1o8q747la
Tags: 2.4.6.1-2
* Bug fix: "FTBFS with GCC 4.3: missing #includes", thanks to Martin
  Michlmayr (Closes: #454890).
- 13_gcc4: updated

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
// audioio-mp3.cpp: Interface for mp3 decoders and encoders that support 
3
3
//                  input/output using standard streams. Defaults to
4
4
//                  mpg123 and lame.
5
 
// Copyright (C) 1999-2005 Kai Vehmanen
 
5
// Copyright (C) 1999-2006 Kai Vehmanen
6
6
// Note! Routines for parsing mp3 header information were taken from XMMS
7
7
//       1.2.5's mpg123 plugin. Improvements to parsing logic were
8
8
//       contributed by Julian Dobson.
9
9
//
10
10
// Attributes:
11
 
//     eca-style-version: 3
 
11
//     eca-style-version: 3 (see Ecasound Programmer's Guide)
12
12
//
13
13
// References:
14
14
//     http://www.mp3-tech.org/programmer/frame_header.html
336
336
 
337
337
MP3FILE::~MP3FILE(void)
338
338
{
 
339
  clean_child(true);
339
340
  if (is_open() == true) {
340
341
    close();
341
342
  }
363
364
void MP3FILE::close(void)
364
365
{
365
366
  if (pid_of_child() > 0) {
366
 
      ECA_LOG_MSG(ECA_LOGGER::user_objects, "Cleaning child process." + kvu_numtostr(pid_of_child()) + ".");
367
 
      clean_child();
 
367
      ECA_LOG_MSG(ECA_LOGGER::user_objects, "Cleaning child process pid=" + kvu_numtostr(pid_of_child()) + ".");
 
368
      /* note: mp3 input/output can handle SIGTERM */
 
369
      clean_child(true);
368
370
      triggered_rep = false;
369
371
  }
370
372
 
429
431
  if (triggered_rep == true &&
430
432
      last_position_rep != position_in_samples()) {
431
433
    if (is_open() == true) {
432
 
      ECA_LOG_MSG(ECA_LOGGER::user_objects, "Cleaning child process." + kvu_numtostr(pid_of_child()) + ".");
 
434
      ECA_LOG_MSG(ECA_LOGGER::user_objects, "Cleaning child process pid=" + kvu_numtostr(pid_of_child()) + ".");
433
435
      clean_child();
434
436
      triggered_rep = false;
435
437
    }