Skip to content

Commit

Permalink
indentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
williamh committed Jul 2, 2009
1 parent cc7e77e commit 18ebab3
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 19 deletions.
7 changes: 4 additions & 3 deletions alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ static int minimum(int x, int y)
return y;
}

static int alsa_callback(short *audio, int numsamples, espeak_EVENT * events)
static int alsa_callback(short *audio, int numsamples,
espeak_EVENT * events)
{
int samples_written = 0;
int avail;
Expand All @@ -79,7 +80,7 @@ static int alsa_callback(short *audio, int numsamples, espeak_EVENT * events)
return 1;
}

while (numsamples > 0 && (! stop_requested && should_run)) {
while (numsamples > 0 && (!stop_requested && should_run)) {
avail = snd_pcm_avail_update(handle);
if (avail <= 0) {
if (avail < 0)
Expand Down Expand Up @@ -170,7 +171,7 @@ void stop_audio(void)
{
lock_audio_mutex();
stop_requested = 1;
if(snd_pcm_drop(handle) < 0)
if (snd_pcm_drop(handle) < 0)
fprintf(stderr, "Negative return from snd_pcm_drop!\n");
snd_pcm_prepare(handle);
unlock_audio_mutex();
Expand Down
2 changes: 1 addition & 1 deletion espeakup.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ int main(int argc, char **argv)

espeak_Terminate();
close_softsynth();
if ( ! debug)
if (!debug)
unlink(pidPath);
return 0;
}
2 changes: 1 addition & 1 deletion queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef __QUEUE_H
#define __QUEUE_H

struct queue_t; /* An opaque type. */
struct queue_t; /* An opaque type. */

extern struct queue_t *new_queue(void);
extern int queue_add(struct queue_t *q, void *entry);
Expand Down
6 changes: 3 additions & 3 deletions signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ static void dummy_handler(int sig)
void *signal_thread(void *arg)
{
struct sigaction temp;
sigset_t sigset;
int sig;
sigset_t sigset;
int sig;

/* install dummy handlers for the signals we want to process */
temp.sa_handler = dummy_handler;
Expand All @@ -47,7 +47,7 @@ void *signal_thread(void *arg)
sigaction(SIGTERM, &temp, NULL);

pthread_mutex_lock(&queue_guard);
while(should_run) {
while (should_run) {
pthread_mutex_unlock(&queue_guard);
sigfillset(&sigset);
sigwait(&sigset, &sig);
Expand Down
6 changes: 3 additions & 3 deletions softsynth.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void queue_add_cmd(enum command_t cmd, enum adjust_t adj, int value)
if (!added)
free(entry);
else
pthread_cond_signal(&runner_awake);
pthread_cond_signal(&runner_awake);
pthread_mutex_unlock(&queue_guard);
}

Expand Down Expand Up @@ -183,8 +183,8 @@ static void request_espeak_stop(void)
pthread_mutex_lock(&queue_guard);
runner_must_stop = 1;
pthread_cond_signal(&runner_awake); /* Wake runner, if necessary. */
while(should_run && (runner_must_stop == 1))
pthread_cond_wait(&stop_acknowledged, &queue_guard); /* wait for acknowledgement. */
while (should_run && (runner_must_stop == 1))
pthread_cond_wait(&stop_acknowledged, &queue_guard); /* wait for acknowledgement. */
pthread_mutex_unlock(&queue_guard);
}

Expand Down
20 changes: 12 additions & 8 deletions synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const int volumeMultiplier = 22;

volatile int runner_must_stop = 0;

static espeak_ERROR set_frequency(struct synth_t *s, int freq, enum adjust_t adj)
static espeak_ERROR set_frequency(struct synth_t *s, int freq,
enum adjust_t adj)
{
espeak_ERROR rc;

Expand All @@ -54,7 +55,8 @@ static espeak_ERROR set_frequency(struct synth_t *s, int freq, enum adjust_t adj
return rc;
}

static espeak_ERROR set_pitch(struct synth_t * s, int pitch, enum adjust_t adj)
static espeak_ERROR set_pitch(struct synth_t *s, int pitch,
enum adjust_t adj)
{
espeak_ERROR rc;

Expand All @@ -68,8 +70,8 @@ static espeak_ERROR set_pitch(struct synth_t * s, int pitch, enum adjust_t adj)
return rc;
}

static espeak_ERROR set_punctuation(struct synth_t * s, int punct,
enum adjust_t adj)
static espeak_ERROR set_punctuation(struct synth_t *s, int punct,
enum adjust_t adj)
{
espeak_ERROR rc;

Expand All @@ -83,7 +85,8 @@ static espeak_ERROR set_punctuation(struct synth_t * s, int punct,
return rc;
}

static espeak_ERROR set_rate(struct synth_t * s, int rate, enum adjust_t adj)
static espeak_ERROR set_rate(struct synth_t *s, int rate,
enum adjust_t adj)
{
espeak_ERROR rc;

Expand All @@ -98,7 +101,7 @@ static espeak_ERROR set_rate(struct synth_t * s, int rate, enum adjust_t adj)
return rc;
}

static espeak_ERROR set_voice(struct synth_t * s, char *voice)
static espeak_ERROR set_voice(struct synth_t *s, char *voice)
{
espeak_ERROR rc;

Expand All @@ -108,7 +111,8 @@ static espeak_ERROR set_voice(struct synth_t * s, char *voice)
return rc;
}

static espeak_ERROR set_volume(struct synth_t * s, int vol, enum adjust_t adj)
static espeak_ERROR set_volume(struct synth_t *s, int vol,
enum adjust_t adj)
{
espeak_ERROR rc;

Expand All @@ -134,7 +138,7 @@ static espeak_ERROR stop_speech(void)
return rc;
}

static espeak_ERROR speak_text(struct synth_t * s)
static espeak_ERROR speak_text(struct synth_t *s)
{
espeak_ERROR rc;

Expand Down

0 comments on commit 18ebab3

Please sign in to comment.