Crossfire Client, Branches  R11627
sound.c File Reference
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <signal.h>
#include <errno.h>
#include <client-types.h>
#include "client.h"
+ Include dependency graph for sound.c:

Go to the source code of this file.

Functions

int init_sounds (void)
 
void MusicCmd (const char *data, int len)
 
static void play_sound (int soundnum, int soundtype, int x, int y)
 
static void signal_pipe (int i)
 
void Sound2Cmd (unsigned char *data, int len)
 
void SoundCmd (unsigned char *data, int len)
 

Variables

const char *const rcsid_gtk_sound_c
 
static FILE * sound_pipe = NULL
 
static ChildProcesssound_process
 

Detailed Description

This file contains the sound support for the GTK V1 client. It does not actually play sounds, but rather tries to run cfsndserver, which is responsible for playing sounds.

Definition in file sound.c.

Function Documentation

int init_sounds ( void  )

Definition at line 60 of file sound.c.

void MusicCmd ( const char *  data,
int  len 
)

Definition at line 199 of file sound.c.

static void play_sound ( int  soundnum,
int  soundtype,
int  x,
int  y 
)
static

Definition at line 112 of file sound.c.

References CONFIG_SOUND, LOG(), LOG_ERROR, sound_pipe, and use_config.

Referenced by SoundCmd().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void signal_pipe ( int  i)
static

Definition at line 48 of file sound.c.

Referenced by init_sounds().

+ Here is the caller graph for this function:

void Sound2Cmd ( unsigned char *  data,
int  len 
)

Definition at line 151 of file sound.c.

void SoundCmd ( unsigned char *  data,
int  len 
)

Definition at line 130 of file sound.c.

Variable Documentation

const char* const rcsid_gtk_sound_c
Initial value:
=
"$Id: sound.c 9719 2008-08-04 18:57:47Z ryo_saeba $"

Definition at line 1 of file sound.c.

FILE* sound_pipe = NULL
static

Definition at line 52 of file sound.c.

Referenced by init_sounds(), and play_sound().

ChildProcess* sound_process
static

Definition at line 53 of file sound.c.