include/thread.h
author Markus Bröker <mbroeker@largo.dyndns.tv>
Mon, 09 Sep 2013 15:54:09 +0200
changeset 4 be4de85337e5
parent 0 06dd3b8d90ad
permissions -rw-r--r--
Small changes committer: Markus Bröker <mbroeker@largo.homelinux.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     1
/**
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     2
 *  $Id: thread.h 53 2008-01-10 00:19:41Z mbroeker $
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     3
 * $URL: http://localhost/svn/c/VirtualReader/trunk/include/thread.h $
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     4
 */
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     5
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     6
#ifndef __THREAD_H__
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     7
#define __THREAD_H__
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     8
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     9
#include <pthread.h>
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    10
#include <sentence.h>
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    11
#include <interface.h>
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    12
#include <audioplayer.h>
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    13
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    14
#ifndef TIMEOUT
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    15
#define TIMEOUT 186
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    16
#endif
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    17
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    18
typedef struct {
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    19
    int satz;
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    20
    int items;
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    21
    char *fname;
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    22
    tts_options ttsopt;
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    23
    ttshandles ttsh;
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    24
    char **sentences;
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    25
    long **timings;
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    26
} ThreadData;
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    27
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    28
/* reads the wavefiles from disk */
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    29
void readtext (ThreadData *);
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    30
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    31
/* stores the data on the harddisk */
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    32
void writewav (ThreadData *);
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    33
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    34
/* (re)starts a thread */
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    35
int p_thread_restart (pthread_t, void *, ThreadData *);
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    36
06dd3b8d90ad Virtual Reader
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    37
#endif