Skip to content

Commit

Permalink
Merge branch 'master' of github.com:MythTV/mythtv
Browse files Browse the repository at this point in the history
  • Loading branch information
NigelPearson committed May 15, 2011
2 parents 6101e24 + 9836c10 commit 86e34fb
Show file tree
Hide file tree
Showing 62 changed files with 1,203 additions and 965 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/audio/audiooutputalsa.cpp
Expand Up @@ -431,7 +431,7 @@ bool AudioOutputALSA::OpenDevice()
}

buffer_time = 500000; // buffer 0.5s worth of samples
period_time = 16; // aim for an interrupt every (1/16th of buffer_time)
period_time = 4; // aim for an interrupt every (1/4th of buffer_time)

err = SetParameters(pcm_handle, format, channels, samplerate,
buffer_time, period_time);
Expand Down
20 changes: 1 addition & 19 deletions mythtv/libs/libmyth/audio/audiooutputbase.cpp
Expand Up @@ -1166,32 +1166,19 @@ int AudioOutputBase::CopyWithUpmix(char *buffer, int frames, int &org_waud)
off = processing ? 4 : output_settings->SampleSize(format);
off *= source_channels;

VERBOSE(VB_AUDIO, LOC + QString("CopyWithUpmix: Frames = %1").arg(frames));

int nFrames, bdFrames;
int i = 0;
len = 0;
int nFrames, bdFrames;
while (i < frames)
{
i += upmixer->putFrames(buffer + i * off, frames - i, source_channels);
VERBOSE(VB_AUDIO, LOC + QString("CopyWithUpmix: Done %1 Frames").arg(i));

nFrames = upmixer->numFrames();
if (!nFrames)
{
VERBOSE(VB_AUDIO, LOC + QString("CopyWithUpmix: Got 0 in return (frames=%1 i=%2")
.arg(frames).arg(i));
continue;
}

len += CheckFreeSpace(nFrames);

bdFrames = (kAudioRingBufferSize - org_waud) / bpf;
if ((int)(kAudioRingBufferSize - org_waud) != (bdFrames * bpf))
{
VERBOSE(VB_AUDIO, LOC + QString("CopyWithUpmix: will miss data (%1)")
.arg(bdiff - (bdFrames * bpf)));
}
if (bdFrames < nFrames)
{
upmixer->receiveFrames((float *)(WPOS), bdFrames);
Expand Down Expand Up @@ -1401,11 +1388,6 @@ bool AudioOutputBase::AddData(void *in_buffer, int in_len,
// does not change the timecode, only the number of samples
org_waud = waud;
int bdFrames = bdiff / bpf;
if (bdiff != (bdFrames * bpf))
{
VERBOSE(VB_AUDIO, LOC + QString("TStretch AddData: will miss data (%1)")
.arg(bdiff - (bdFrames * bpf)));
}

if (bdiff < len)
{
Expand Down
5 changes: 5 additions & 0 deletions mythtv/libs/libmythdvdnav/dvdnav/dvdnav.h
Expand Up @@ -261,6 +261,11 @@ dvdnav_status_t dvdnav_stop(dvdnav_t *self);
* title/part navigation *
*********************************************************************/

/*
* Play DVD from the Beginning
*/
void dvdnav_first_play(dvdnav_t *self);

/*
* Returns the number of titles on the disk.
*/
Expand Down
8 changes: 8 additions & 0 deletions mythtv/libs/libmythdvdnav/dvdnav/navigation.c
Expand Up @@ -169,6 +169,14 @@ dvdnav_status_t dvdnav_current_title_program(dvdnav_t *this, int32_t *title, int
return DVDNAV_STATUS_ERR;
}

void dvdnav_first_play(dvdnav_t *this) {
pthread_mutex_lock(&this->vm_lock);
this->started = 0;
vm_start(this->vm);
this->started = 1;
pthread_mutex_unlock(&this->vm_lock);
}

dvdnav_status_t dvdnav_title_play(dvdnav_t *this, int32_t title) {
return dvdnav_part_play(this, title, 1);
}
Expand Down

0 comments on commit 86e34fb

Please sign in to comment.