File: gtschan.c

package info (click to toggle)
glktermw 1.0.4%2Bgit20200122-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 844 kB
  • sloc: ansic: 22,241; makefile: 27
file content (101 lines) | stat: -rw-r--r-- 2,183 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/* gtschan.c: Sound channel objects
        for GlkTerm, curses.h implementation of the Glk API.
    Designed by Andrew Plotkin <erkyrath@eblong.com>
    http://www.eblong.com/zarf/glk/index.html
*/

#include "gtoption.h"
#include <stdio.h>
#include <wchar.h>
#include "glk.h"
#include "glkterm.h"

/* The whole sound-channel situation is very simple for us;
   we don't support it. */

#ifdef GLK_MODULE_SOUND

schanid_t glk_schannel_create(glui32 rock)
{
  return NULL;
}

void glk_schannel_destroy(schanid_t chan)
{
}

schanid_t glk_schannel_iterate(schanid_t chan, glui32 *rockptr)
{
  if (rockptr)
    *rockptr = 0;
  return NULL;
}

glui32 glk_schannel_get_rock(schanid_t chan)
{
  gli_strict_warning(L"schannel_get_rock: invalid id.");
  return 0;
}

glui32 glk_schannel_play(schanid_t chan, glui32 snd)
{
  gli_strict_warning(L"schannel_play: invalid id.");
  return 0;
}

glui32 glk_schannel_play_ext(schanid_t chan, glui32 snd, glui32 repeats,
    glui32 notify)
{
  gli_strict_warning(L"schannel_play_ext: invalid id.");
  return 0;
}

void glk_schannel_stop(schanid_t chan)
{
  gli_strict_warning(L"schannel_stop: invalid id.");
}

void glk_schannel_set_volume(schanid_t chan, glui32 vol)
{
  gli_strict_warning(L"schannel_set_volume: invalid id.");
}

void glk_sound_load_hint(glui32 snd, glui32 flag)
{
  gli_strict_warning(L"schannel_sound_load_hint: invalid id.");
}

#ifdef GLK_MODULE_SOUND2

schanid_t glk_schannel_create_ext(glui32 rock, glui32 volume)
{
  return NULL;
}

glui32 glk_schannel_play_multi(schanid_t *chanarray, glui32 chancount,
  glui32 *sndarray, glui32 soundcount, glui32 notify)
{
  if (chancount != soundcount)
    gli_strict_warning(L"schannel_play_multi: channel count does not match sound count.");
  return 0;
}

void glk_schannel_pause(schanid_t chan)
{
  gli_strict_warning(L"schannel_pause: invalid id.");
}

void glk_schannel_unpause(schanid_t chan)
{
  gli_strict_warning(L"schannel_unpause: invalid id.");
}

void glk_schannel_set_volume_ext(schanid_t chan, glui32 vol,
  glui32 duration, glui32 notify)
{
  gli_strict_warning(L"schannel_set_volume_ext: invalid id.");
}

#endif /* GLK_MODULE_SOUND2 */

#endif /* GLK_MODULE_SOUND */